From e3446ec646155eeda0022a8dd5f2c5c8370320fd Mon Sep 17 00:00:00 2001 From: Valentin Platzgummer Date: Tue, 23 Jun 2020 10:57:50 +0200 Subject: [PATCH] CMake files edited --- .gitmodules | 4 +- CMakeCache.txt | 173 +++++++++++++++++++++++++++++++- CMakeLists.txt | 4 +- libs/ortools-with-cmake | 2 +- libs/snake/snake/CMakeLists.txt | 5 +- libs/test/CMakeLists.txt | 17 ++++ libs/test/main.cpp | 5 + 7 files changed, 201 insertions(+), 9 deletions(-) create mode 100644 libs/test/CMakeLists.txt create mode 100644 libs/test/main.cpp diff --git a/.gitmodules b/.gitmodules index 561ec2346..f62e168cb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,6 +10,6 @@ [submodule "libs/polylabel"] path = libs/polylabel url = https://github.com/mapbox/polylabel.git -[submodule "ortools-with-cmake"] - path = ortools-with-cmake +[submodule "libs/ortools-with-cmake"] + path = libs/ortools-with-cmake url = https://github.com/jwdinius/ortools-with-cmake.git diff --git a/CMakeCache.txt b/CMakeCache.txt index c6a6f2bc4..ff730841a 100644 --- a/CMakeCache.txt +++ b/CMakeCache.txt @@ -14,6 +14,12 @@ # EXTERNAL cache entries ######################## +//Path to a program. +BASH_EXECUTABLE:FILEPATH=/bin/bash + +//Build shared libraries +BUILD_SHARED_LIBS:BOOL=OFF + //Use ccache if available CCACHE:BOOL=ON @@ -56,6 +62,33 @@ CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG //Flags used by the compiler during release builds with debug info. CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG +//C compiler +CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-7 + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-7 + +//Flags used by the compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the compiler during release builds for minimum +// size. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the compiler during release builds. +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the compiler during release builds with debug info. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + //Flags used by the linker. CMAKE_EXE_LINKER_FLAGS:STRING= @@ -74,9 +107,21 @@ CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= //Enable/Disable output of compile commands during generation. CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF +//install location for user executables +CMAKE_INSTALL_BINDIR:PATH=/usr/local/bin + +//install location for C header files +CMAKE_INSTALL_INCLUDEDIR:PATH=/usr/local/include + +//install location for object code libraries +CMAKE_INSTALL_LIBDIR:PATH=/usr/local/lib + //Install path prefix, prepended onto install directories. CMAKE_INSTALL_PREFIX:PATH=/usr/local +//install location for read-only architecture-independent shp data +CMAKE_INSTALL_SHP_DATADIR:PATH=/usr/local/share/shp + //Path to a program. CMAKE_LINKER:FILEPATH=/usr/bin/ld @@ -159,14 +204,122 @@ CMAKE_STRIP:FILEPATH=/usr/bin/strip // Studio IDE projects all commands are done without /nologo. CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE +//The directory containing a CMake configuration file for GeographicLib. +GeographicLib_DIR:PATH=/usr/local/lib/cmake/GeographicLib + +//Path to a library. +M_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libm.so + //Value Computed by CMake QGroundControl_BINARY_DIR:STATIC=/home/valentin/Desktop/drones/qgroundcontrol //Value Computed by CMake QGroundControl_SOURCE_DIR:STATIC=/home/valentin/Desktop/drones/qgroundcontrol +//No help, variable specified on the command line. +QT_VERSION:UNINITIALIZED=5.9.5 + +//The directory containing a CMake configuration file for Qt5Bluetooth. +Qt5Bluetooth_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Bluetooth + +//The directory containing a CMake configuration file for Qt5Concurrent. +Qt5Concurrent_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Concurrent + +//The directory containing a CMake configuration file for Qt5Core. +Qt5Core_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Core + +//The directory containing a CMake configuration file for Qt5Gui. +Qt5Gui_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Gui + +//The directory containing a CMake configuration file for Qt5Location. +Qt5Location_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Location + +//The directory containing a CMake configuration file for Qt5Multimedia. +Qt5Multimedia_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Multimedia + +//The directory containing a CMake configuration file for Qt5Network. +Qt5Network_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Network + +//The directory containing a CMake configuration file for Qt5Positioning. +Qt5Positioning_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Positioning + +//The directory containing a CMake configuration file for Qt5Qml. +Qt5Qml_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Qml + +//The directory containing a CMake configuration file for Qt5QuickWidgets. +Qt5QuickWidgets_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5QuickWidgets + +//The directory containing a CMake configuration file for Qt5Quick. +Qt5Quick_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Quick + +//The directory containing a CMake configuration file for Qt5SerialPort. +Qt5SerialPort_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5SerialPort + +//The directory containing a CMake configuration file for Qt5Sql. +Qt5Sql_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Sql + +//The directory containing a CMake configuration file for Qt5Svg. +Qt5Svg_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Svg + +//The directory containing a CMake configuration file for Qt5Test. +Qt5Test_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Test + +//The directory containing a CMake configuration file for Qt5TextToSpeech. +Qt5TextToSpeech_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5TextToSpeech + +//The directory containing a CMake configuration file for Qt5Widgets. +Qt5Widgets_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Widgets + +//The directory containing a CMake configuration file for Qt5Xml. +Qt5Xml_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5Xml + //The directory containing a CMake configuration file for Qt5. -Qt5_DIR:PATH=Qt5_DIR-NOTFOUND +Qt5_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt5 + +//Path to a program. +SED_EXECUTABLE:FILEPATH=/bin/sed + +//Drop "unable to open" error messages +SHP_DROP_UNABLE_TO_OPEN_MSG:BOOL=ON + +//Value Computed by CMake +SNAKE_BINARY_DIR:STATIC=/home/valentin/Desktop/drones/qgroundcontrol/libs/snake/snake + +//Value Computed by CMake +SNAKE_SOURCE_DIR:STATIC=/home/valentin/Desktop/drones/qgroundcontrol/libs/snake/snake + +//Use -rpath when linking libraries, executables +USE_RPATH:BOOL=ON + +//The directory containing a CMake configuration file for ortools. +ortools_DIR:PATH=ortools_DIR-NOTFOUND + +//Value Computed by CMake +polyclipping_BINARY_DIR:STATIC=/home/valentin/Desktop/drones/qgroundcontrol/libs/clipper + +//The directory containing a CMake configuration file for polyclipping. +polyclipping_DIR:PATH=polyclipping_DIR-NOTFOUND + +//Dependencies for target +polyclipping_LIB_DEPENDS:STATIC= + +//Value Computed by CMake +polyclipping_SOURCE_DIR:STATIC=/home/valentin/Desktop/drones/qgroundcontrol/libs/clipper + +//Dependencies for the target +qwt_LIB_DEPENDS:STATIC=general;Qt5::Concurrent;general;Qt5::Core;general;Qt5::Svg;general;Qt5::Widgets; + +//Value Computed by CMake +shapelib_BINARY_DIR:STATIC=/home/valentin/Desktop/drones/qgroundcontrol/libs/shapelib + +//Value Computed by CMake +shapelib_SOURCE_DIR:STATIC=/home/valentin/Desktop/drones/qgroundcontrol/libs/shapelib + +//Dependencies for the target +shp_LIB_DEPENDS:STATIC=general;-lm; + +//Dependencies for target +snake_LIB_DEPENDS:STATIC= ######################## @@ -209,6 +362,22 @@ CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_AR +CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB +CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //Executable file format CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS @@ -253,7 +422,7 @@ CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_NM CMAKE_NM-ADVANCED:INTERNAL=1 //number of local generators -CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=7 //ADVANCED property for variable: CMAKE_OBJCOPY CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_OBJDUMP diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ed2a9aca..ed3bc7fbd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,8 +16,8 @@ if(DEFINED ENV{QT_VERSION}) endif() if(NOT QT_VERSION) - # try Qt 5.11.2 if none specified - set(QT_VERSION "5.11.2") + # try Qt 5.9.5 if none specified + set(QT_VERSION "5.9.5") endif() if(DEFINED ENV{QT_MKSPEC}) diff --git a/libs/ortools-with-cmake b/libs/ortools-with-cmake index 182f6e42b..cc69735ab 160000 --- a/libs/ortools-with-cmake +++ b/libs/ortools-with-cmake @@ -1 +1 @@ -Subproject commit 182f6e42b3ec127ecc90045b9b44f292c6b7831a +Subproject commit cc69735ab7afdcb124456a96c6c76e0d328da52f diff --git a/libs/snake/snake/CMakeLists.txt b/libs/snake/snake/CMakeLists.txt index 64981aadd..6e12365c6 100644 --- a/libs/snake/snake/CMakeLists.txt +++ b/libs/snake/snake/CMakeLists.txt @@ -20,8 +20,9 @@ add_library(snake set(CLIPPER_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../clipper) #set(ORTOOLS_LIB_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../or-tools/lib) -add_library(polyclipping ${CLIPPER_PATH}/clipper.cpp) -include_directories(${CLIPPER_PATH}) # external header only lib +find_package(polyclipping REQUIRED) +#add_library(polyclipping ${CLIPPER_PATH}/clipper.cpp) +#include_directories(${CLIPPER_PATH}) # external header only lib #include_directories(${ORTOOLS_INCLUDE_PATH}) find_package (GeographicLib REQUIRED) target_link_libraries (snake ${GeographicLib_LIBRARIES} polyclipping) diff --git a/libs/test/CMakeLists.txt b/libs/test/CMakeLists.txt new file mode 100644 index 000000000..b4a05b384 --- /dev/null +++ b/libs/test/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.5) + +project(SNAKE LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + + +set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -Wpedantic") + +find_package(Eigen3 REQUIRED) +add_executable(main main.cpp) +target_link_libraries(main Eigen) + + + diff --git a/libs/test/main.cpp b/libs/test/main.cpp new file mode 100644 index 000000000..362097649 --- /dev/null +++ b/libs/test/main.cpp @@ -0,0 +1,5 @@ +#include + +int main(){ + return 0; +} -- 2.22.0