forked from bpswenson/sst_airport_sim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
42 lines (34 loc) · 1013 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
33
34
35
36
37
38
39
40
41
cmake_minimum_required(VERSION 3.16)
project(AirportSim)
set(CMAKE_CXX_STANDARD 17)
set(SST_INCLUDE_DIR "$ENV{SST_CORE_HOME}/include")
set(PYTHON_FILE
execution_scripts/scratch/airport_sim.py
execution_scripts/scratch/airport_sim2.py
)
set(SOURCE_FILES
Common.hpp
Airport.hpp
Airport.cpp
AirportEvent.hpp
RoughAirLink.hpp
RoughAirLink.cpp
)
add_custom_target(CopyPython ALL
DEPENDS ${CMAKE_SOURCE_DIR}/${PYTHON_FILE}
)
add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES})
target_include_directories(${PROJECT_NAME} PRIVATE
${SST_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/src
)
add_custom_command(TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND sst-register ${PROJECT_NAME} ${PROJECT_NAME}_LIBDIR=${CMAKE_CURRENT_BINARY_DIR}
VERBATIM
)
add_custom_command(TARGET CopyPython
POST_BUILD
COMMAND cp -r ${CMAKE_SOURCE_DIR}/execution_scripts ${CMAKE_CURRENT_BINARY_DIR}/
VERBATIM
)