-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
33 lines (26 loc) · 1.33 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
cmake_minimum_required(VERSION 3.14)
project(RT-THREAD)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/ )
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/ )
set(CMAKE_ROOT_PATH ${PROJECT_SOURCE_DIR})
if (WIN32)
SET( CMAKE_EXECUTABLE_OUTPUT_PATH_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
SET( CMAKE_EXECUTABLE_OUTPUT_PATH_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/logs)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
${CMAKE_CURRENT_SOURCE_DIR}/scripts/plot.py
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/plot.py)
include_directories(include)
add_library(ThreadWrapper src/ThreadUtils/ThreadWrapper.cpp)
target_link_libraries(ThreadWrapper pthread)
add_subdirectory(examples)