-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
34 lines (29 loc) · 966 Bytes
/
CMakeLists.txt
File metadata and controls
34 lines (29 loc) · 966 Bytes
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(trep)
set(CMAKE_CXX_STANDARD 11)
if(EXISTS "${CMAKE_SOURCE_DIR}/pybind11")
message(STATUS "Found pybind11")
add_subdirectory(pybind11)
else()
include(pybind11.cmake)
endif()
include_directories("${CMAKE_SOURCE_DIR}/src" "${CMAKE_SOURCE_DIR}/python")
#set(Python_FIND_VIRTUALENV FIRST)
#find_package(Python COMPONENTS Interpreter Development)
#set(PYTHON_EXECUTABLE "${Python_EXECUTABLE}")
#set(PYTHON_LIBRARY "${Python_LIBRARIES}")
#set(PYTHON_LIBRARY_DIR "${Python_SITELIB}")
file (GLOB SOURCE_FILES "src/*.cc")
file (GLOB HEADER_FILES "src/*.h")
file (GLOB PYTHON_FILES "python/*.cc" "python/*.h")
pybind11_add_module(trep
${SOURCE_FILES}
${HEADER_FILES}
${PYTHON_FILES}
)
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SOURCE_FILES} ${HEADER_FILES} ${PYTHON_FILES} )
#target_link_libraries(trep PUBLIC)
#install(TARGETS trep
# COMPONENT python
# LIBRARY DESTINATION "${PYTHON_LIBRARY_DIR}"
# )