diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-11-17 17:21:42 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-12-16 07:59:01 -0800 |
commit | 65cecad564929e25940ba0b5e9d61c9024da49a8 (patch) | |
tree | d867d3c1560f4d179325ba13b75b91362301262e /CMakeLists.txt | |
parent | c738dade4787686fa6c8ba7c305af98495315832 (diff) | |
download | subsurface-65cecad564929e25940ba0b5e9d61c9024da49a8.tar.gz |
Add some commits to make cmake clear
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c9c429608..3a0716ea6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,6 +61,9 @@ execute_process( message(STATUS "Creating build files for Subsurface ${SSRF_VERSION_STRING}") +# +# TODO: This Compilation part should go on the Target specific CMake. +# if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") @@ -76,6 +79,13 @@ endif() # pkgconfig for required libraries find_package(PkgConfig) include(cmake/Modules/pkgconfig_helper.cmake) + +# The 'HandleFindXXX' are special libraries that subsurface needs +# to find and configure in a few different ways because of a few +# developers that prefer pkg-config over CMake, so we try to make +# everyone happy. It also sets some variables for each library, so +# if you think a module miss anything, take a look on the specific +# module file. include(cmake/Modules/HandleFindGit2.cmake) pkg_config_library(LIBXML libxml-2.0 REQUIRED) @@ -84,13 +94,11 @@ pkg_config_library(LIBXSLT libxslt REQUIRED) pkg_config_library(LIBZIP libzip REQUIRED) pkg_config_library(LIBUSB libusb-1.0 QUIET) - if(SMARTTRAK_IMPORT) pkg_config_library(GLIB2 glib-2.0 REQUIRED) pkg_config_library(LIBMDB libmdb REQUIRED) endif() - if(LIBDC_FROM_PKGCONFIG) pkg_config_library(LIBDC libdivecomputer REQUIRED) set(LIBDIVECOMPUTER_LIBRARIES "") @@ -155,7 +163,6 @@ else() endif() set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${LIBDIVECOMPUTER_LIBRARIES} ${LIBGIT2_LIBRARIES} ${LIBUSB_LIBRARIES}) - add_custom_target(link_marble_data ALL COMMAND rm -rf ./marbledata && ln -s ${CMAKE_SOURCE_DIR}/marbledata ${CMAKE_BINARY_DIR}/marbledata) # configure Qt. |