-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
19 lines (15 loc) · 680 Bytes
/
CMakeLists.txt
File metadata and controls
19 lines (15 loc) · 680 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
add_subdirectory(pybind11)
pybind11_add_module(inkcpp_py src/module.cpp)
target_compile_definitions(inkcpp_py PRIVATE VERSION_INFO=${VERSION})
target_link_libraries(inkcpp_py PUBLIC inkcpp inkcpp_compiler inkcpp_shared)
# For https://en.cppreference.com/w/cpp/filesystem#Notes
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.1")
target_link_libraries(inkcpp_py PRIVATE stdc++fs)
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0")
target_link_libraries(inkcpp_py PRIVATE stdc++fs)
endif()
endif()
install(TARGETS inkcpp_py DESTINATION . COMPONENT py EXCLUDE_FROM_ALL)