forked from rettichschnidi/HAPviewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
49 lines (39 loc) · 1.78 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#CMake 2.6 is the minimal supported version of CMake
cmake_minimum_required (VERSION 2.6)
project(HAPviewer)
#Set the version of HAPviewer
set(VERSION 2.0)
#Use CMAKE_CXX_FLAGS_DEBUG per default. Can be changed to Release, RelWithDebInfo, MinSizeRel
#http://www.cmake.org/Wiki/CMake_Useful_Variables#Compilers_and_Tools
set(CMAKE_BUILD_TYPE Debug)
#Exit if someone tries to contaminates the source directory with an in-source build
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message (FATAL_ERROR "Please do out-of-source builds.\nCleanup: \"rm -rf CMake CMakeCache.txt CMakeFiles/\"")
endif()
#include our own FindXY.cmake files
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/modules/general/")
#include aditional files if we are using a _really_ old version of cmake (2.6.x)
if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/modules/v2.6/")
endif()
#Place all executables in bin/, libraries in /lib
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
#Option to perform nightly, continuous, and experimental tests incl. submission to cdash
option (HAPVIEWER_ENABLE_TESTING "Build tests" ON)
if (HAPVIEWER_ENABLE_TESTING)
include(CTest)
enable_testing()
endif()
#include the directory with the HAPviewer/hapviz sources
add_subdirectory(src)
#Allows to build the doxygen documentation via "make doc"
option (HAPVIEWER_ENABLE_DOC "Enable \"make doc\" to build the doxygen documentation" ON)
if (HAPVIEWER_ENABLE_DOC)
set(DOXYGEN_FIND_REQUIRED true)
find_package(Doxygen)
if (DOXYGEN_FOUND STREQUAL "NO")
message(FATAL_ERROR "You neeed Doxygen in order to generate the documentation")
endif()
add_subdirectory(doc)
endif()