-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
47 lines (38 loc) · 1.17 KB
/
CMakeLists.txt
File metadata and controls
47 lines (38 loc) · 1.17 KB
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
set(headers
cppfmu/cppfmu_cs.hpp
cppfmu/cppfmu_common.hpp
fmi/fmi2Functions.h
fmi/fmi2FunctionTypes.h
fmi/fmi2TypesPlatform.h
pythonfmu/PySlaveInstance.hpp
pythonfmu/PyState.hpp
)
set(sources
cppfmu/cppfmu_cs.cpp
cppfmu/fmi_functions.cpp
pythonfmu/PySlaveInstance.cpp
)
SET (CMAKE_SHARED_LINKER_FLAGS
"${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath,'$ORIGIN'")
add_library(pythonfmu-export ${sources} ${headers})
target_compile_features(pythonfmu-export PUBLIC "cxx_std_17")
target_include_directories(pythonfmu-export
PRIVATE
"${Python3_INCLUDE_DIRS}"
"${CMAKE_CURRENT_SOURCE_DIR}"
)
target_link_libraries(pythonfmu-export
PRIVATE
${Python3_LIBRARIES}
)
if (WIN32)
set_target_properties(pythonfmu-export
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_SOURCE_DIR}/../resources/binaries/${TARGET_PLATFORM}"
)
else ()
set_target_properties(pythonfmu-export
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/../resources/binaries/${TARGET_PLATFORM}"
)
endif ()