-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
51 lines (40 loc) · 1.3 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
cmake_minimum_required(VERSION 3.16)
project(xbot_framework C CXX)
set(CPACK_COMPONENTS_ALL "")
if(NOT DEFINED XBOT_BUILD_LIB_SERVICE)
set(XBOT_BUILD_LIB_SERVICE ON)
endif ()
if(NOT DEFINED XBOT_BUILD_LIB_SERVICE_INTERFACE)
set(XBOT_BUILD_LIB_SERVICE_INTERFACE ON)
endif ()
# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
cmake_policy(SET CMP0135 NEW)
endif ()
if (XBOT_BUILD_EXAMPLES)
message("Building Examples")
set(XBOT_BUILD_LIB_SERVICE ON)
endif ()
add_subdirectory(ext EXCLUDE_FROM_ALL)
add_subdirectory(codegen EXCLUDE_FROM_ALL)
if (XBOT_BUILD_LIB_SERVICE)
message("Building Service Lib")
add_subdirectory(libxbot-service)
list(APPEND CPACK_COMPONENTS_ALL xbot-service)
endif ()
if (XBOT_BUILD_LIB_SERVICE_INTERFACE)
message("Building Service Interface Lib")
add_subdirectory(libxbot-service-interface)
list(APPEND CPACK_COMPONENTS_ALL xbot-service-interface)
endif ()
if (XBOT_BUILD_EXAMPLES)
add_subdirectory(examples)
list(APPEND CPACK_COMPONENTS_ALL EchoServiceBin EchoServiceExample)
endif ()
if (XBOT_BUILD_LIB_SERVICE OR XBOT_BUILD_LIB_SERVICE_INTERFACE)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/
DESTINATION include
FILES_MATCHING PATTERN "*.h*"
)
endif ()
include(CPack)