forked from DieTime/cli-autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
27 lines (23 loc) · 933 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
cmake_minimum_required(VERSION 3.16)
project(CLI-Autocomplete VERSION 1.0.3)
set(CMAKE_CXX_STANDARD 17)
file(GLOB_RECURSE SOURCES src/*.cpp)
file(GLOB_RECURSE INCLUDE include/*.h)
file(GLOB_RECURSE TEST_FILES tests/*.*)
file(GLOB_RECURSE EXAMPLE example/*.cpp)
add_executable(tests ${SOURCES} ${TEST_FILES} ${INCLUDE})
if (WIN32)
set_target_properties(tests PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/tests/")
elseif (UNIX)
set_target_properties(tests PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/tests/${CMAKE_BUILD_TYPE}/")
endif()
add_executable(example ${SOURCES} ${EXAMPLE} ${INCLUDE})
if (WIN32)
set_target_properties(example PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/example/")
elseif (UNIX)
set_target_properties(example PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/example/${CMAKE_BUILD_TYPE}/")
endif()