-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
32 lines (24 loc) · 873 Bytes
/
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
cmake_minimum_required(VERSION 3.20.0)
project(plugin_manager_project VERSION 1.1)
set(CMAKE_CXX_STANDARD 20)
option(PM_BUILD_EXAMPLES "Generate examples target" ON)
option(PM_BUILD_TESTS "Generate tests target" ON)
# Set output directory for executable targets.
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/bin")
# Set output directory for library targets.
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
if(UNIX)
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
endif(UNIX)
add_subdirectory(lib/plugin_manager)
if(PM_BUILD_EXAMPLES)
add_subdirectory(app)
target_link_libraries(app PRIVATE plugin_manager)
endif()
# Tests.
if(PM_BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif()