-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
executable file
·70 lines (47 loc) · 2.17 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
cmake_minimum_required(VERSION 2.8.12)
project(road-generation)
set(BIN_DIR ${CMAKE_SOURCE_DIR} CACHE PATH "BIN_DIR")
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BIN_DIR})
find_package(XercesC REQUIRED)
include_directories(src)
include_directories(${XercesC_INCLUDE_DIR})
add_definitions(-DPROJ_DIR=\"${PROJECT_SOURCE_DIR}\")
option(CREATE_DOXYGEN_TARGET "Creates the doxygen documentation if set." OFF)
# doxygen ---------------------------------------------------------------------------------
if (CREATE_DOXYGEN_TARGET)
message("-- Generation of doxygen target enabled")
find_package(Doxygen)
if (DOXYGEN_FOUND)
# create doc directory
file(MAKE_DIRECTORY ${PROJECT_SOURCE_DIR}/docs)
# settings
set(DOXYGEN_GENERATE_HTML YES)
set(DOXYGEN_GENERATE_XML YES)
set(DOXYGEN_GENERATE_MAN YES)
set(DOXYGEN_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/docs)
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE README.md) #this is not optimal, since the project uses an rst file at the moment
message("Doxygen build started")
doxygen_add_docs(
doxygen
${PROJECT_SOURCE_DIR} README.md #this is not optimal, since the project uses an rst file at the moment
COMMENT "Generate man pages"
)
#build sphinx------------------------------------------
#end sphinx--------------------------------------------
else (DOXYGEN_FOUND)
message("Doxygen needs to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND)
endif (CREATE_DOXYGEN_TARGET)
# project code ---------------------------------------------------------------------------------
add_library("${PROJECT_NAME}" SHARED
"${CMAKE_SOURCE_DIR}/src/libfiles/export.cpp"
)
add_executable("${PROJECT_NAME}_executable"
"${CMAKE_SOURCE_DIR}/src/executable/main.cpp"
"${CMAKE_SOURCE_DIR}/src/executable/helperExec.cpp"
)
target_link_libraries("${PROJECT_NAME}" ${XercesC_LIBRARIES})
target_link_libraries("${PROJECT_NAME}_executable" ${PROJECT_NAME})
add_definitions(-DPROJ_DIR=\"${PROJECT_SOURCE_DIR}\")