summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2018-02-13 14:38:51 +0100
committerGravatar Jan Mulder <jlmulder@xs4all.nl>2018-02-15 21:23:28 +0100
commit88d0ce499d9638d98071c69590238a60d3fe9753 (patch)
tree072aee38f3b7d3bee5233d72c6c6c8385669655c /CMakeLists.txt
parente507b123b5d3584ed112123606a95f0ff456c748 (diff)
downloadsubsurface-88d0ce499d9638d98071c69590238a60d3fe9753.tar.gz
Build: do include modules instead of files
Cleanup only. It seems a little weird to first define a CMAKE_MODULE_PATH search path and then explicitly include files including a hard coded path instead of letting the include command search for the modules we like to include. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt31
1 files changed, 15 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d67879725..94acf6782 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,8 +14,13 @@ endif()
# global settings
+set(CMAKE_MODULE_PATH
+ ${${PROJECT_NAME}_SOURCE_DIR}/cmake/Modules
+ ${CMAKE_MODULE_PATH}
+)
+
set(CMAKE_AUTOMOC ON)
-include(cmake/Modules/MacroOutOfSourceBuild.cmake)
+include(MacroOutOfSourceBuild)
MACRO_ENSURE_OUT_OF_SOURCE_BUILD(
"We don't support building in source, please create a build folder elsewhere and remember to run git clean -xdf to remove temporary files created by CMake."
)
@@ -62,12 +67,6 @@ endif()
set(SUBSURFACE_SOURCE ${CMAKE_SOURCE_DIR})
add_definitions(-DSUBSURFACE_SOURCE="${SUBSURFACE_SOURCE}")
-#evenrything's correct, moving on.
-set(CMAKE_MODULE_PATH
- ${CMAKE_MODULE_PATH}
- ${${PROJECT_NAME}_SOURCE_DIR}/cmake/Modules
-)
-
#
# TODO: This Compilation part should go on the Target specific CMake.
#
@@ -112,7 +111,7 @@ set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2")
# pkgconfig for required libraries
find_package(PkgConfig)
-include(cmake/Modules/pkgconfig_helper.cmake)
+include(pkgconfig_helper)
# The 'HandleFindXXX' are special libraries that subsurface needs
# to find and configure in a few different ways because of a few
@@ -120,16 +119,16 @@ include(cmake/Modules/pkgconfig_helper.cmake)
# 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)
-include(cmake/Modules/HandleFindLibDiveComputer.cmake)
+include(HandleFindGit2)
+include(HandleFindLibDiveComputer)
if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "DesktopExecutable")
- include(cmake/Modules/HandleFindGrantlee.cmake)
- include(cmake/Modules/HandleUserManual.cmake)
+ include(HandleFindGrantlee)
+ include(HandleUserManual)
endif()
-include(cmake/Modules/HandleFtdiSupport.cmake)
-include(cmake/Modules/HandleVersionGeneration.cmake)
-include(cmake/Modules/RunOnBuildDir.cmake)
-include(cmake/Modules/cmake_variables_helper.cmake)
+include(HandleFtdiSupport)
+include(HandleVersionGeneration)
+include(RunOnBuildDir)
+include(cmake_variables_helper)
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
include_directories(${CMAKE_OSX_SYSROOT}/usr/include/libxml2)