mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-30 00:00:11 +01:00

now installs the .so in /usr/lib/pythonX.Y/lib-dynload /usr/bin/... was the wrong place the .so is a shared library not a shared binary therefore: COMPONENT lib instead of: COMPONENT bin Signed-off-by: Kevin Vu te Laar <vu.te@rwth-aachen.de>
21 lines
835 B
CMake
21 lines
835 B
CMake
cmake_minimum_required(VERSION 3.15...3.29)
|
|
project(villas-python-wrapper LANGUAGES CXX)
|
|
|
|
set(PYBIND11_FINDPYTHON ON)
|
|
find_package(pybind11 CONFIG REQUIRED)
|
|
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
|
|
|
message(STATUS "Found Python version: ${Python_VERSION}")
|
|
message(STATUS "Python major version: ${Python_VERSION_MAJOR}")
|
|
message(STATUS "Python minor version: ${Python_VERSION_MINOR}")
|
|
message(STATUS "Python .so install directory: /usr/lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/lib-dynload")
|
|
|
|
pybind11_add_module(villas_node villas-python-wrapper.cpp)
|
|
target_link_libraries(villas_node PUBLIC villas)
|
|
|
|
install(
|
|
TARGETS villas_node
|
|
COMPONENT lib
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
LIBRARY DESTINATION /usr/lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/lib-dynload
|
|
)
|