@@ -8,5 +8,18 @@ if(NOT pybind11_FOUND)
|
||||
FetchContent_MakeAvailable(pybind11)
|
||||
endif()
|
||||
|
||||
# Needed to set ${Python_VERSION_MAJOR} and ${Python_VERSION_MINOR}
|
||||
find_package(
|
||||
Python REQUIRED
|
||||
)
|
||||
|
||||
pybind11_add_module(pytrigdx bindings.cpp)
|
||||
target_link_libraries(pytrigdx PRIVATE trigdx)
|
||||
set_target_properties(pytrigdx PROPERTIES OUTPUT_NAME "trigdx")
|
||||
|
||||
set(PYTHON_SITE_PACKAGES
|
||||
"${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/trigdx"
|
||||
)
|
||||
|
||||
install(TARGETS pytrigdx DESTINATION ${PYTHON_SITE_PACKAGES})
|
||||
install(FILES __init__.py DESTINATION ${PYTHON_SITE_PACKAGES})
|
||||
|
||||
Reference in New Issue
Block a user