-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCMakeLists.txt
63 lines (49 loc) · 1.69 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
# Copyright dSPACE GmbH. All rights reserved.
cmake_minimum_required(VERSION 3.15)
project(DsVeosCoSim VERSION 1.0)
option(BUILD_SHARED_LIBS "Compile dSPACE VEOS CoSim as a shared library" OFF)
option(DSVEOSCOSIM_BUILD_TESTS "Create tests for dSPACE VEOS CoSim" OFF)
option(DSVEOSCOSIM_BUILD_BENCHMARKS "Create benchmarks for dSPACE VEOS CoSim" OFF)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(DSVEOSCOSIM_TYPE STATIC)
if(BUILD_SHARED_LIBS)
set(DSVEOSCOSIM_TYPE SHARED)
endif()
add_subdirectory(src)
if(DSVEOSCOSIM_BUILD_TESTS OR DSVEOSCOSIM_BUILD_BENCHMARKS)
add_subdirectory(shared)
add_subdirectory(third_party)
endif()
if(DSVEOSCOSIM_BUILD_TESTS)
add_subdirectory(test)
add_subdirectory(utilities/TestClient)
add_subdirectory(utilities/TestServer)
add_subdirectory(utilities/PerformanceTestClient)
add_subdirectory(utilities/PerformanceTestServer)
endif()
if(DSVEOSCOSIM_BUILD_BENCHMARKS)
add_subdirectory(benchmark)
endif()
install(EXPORT DsVeosCoSimTargets
FILE DsVeosCoSimTargets.cmake
DESTINATION lib/cmake/DsVeosCoSim
)
include(CMakePackageConfigHelpers)
configure_package_config_file(
${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/DsVeosCoSimConfig.cmake"
INSTALL_DESTINATION "lib/cmake/example"
NO_SET_AND_CHECK_MACRO
NO_CHECK_REQUIRED_COMPONENTS_MACRO
)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/DsVeosCoSimConfigVersion.cmake"
VERSION "${DsVeosCoSim_VERSION_MAJOR}.${DsVeosCoSim_VERSION_MINOR}"
COMPATIBILITY AnyNewerVersion
)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/DsVeosCoSimConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/DsVeosCoSimConfigVersion.cmake
DESTINATION lib/cmake/DsVeosCoSim
)