cmake_minimum_required(VERSION 3.16) project(wfr-python-extension) set(Python_ADDITIONAL_VERSIONS 3.8) find_package(Python3 COMPONENTS Interpreter Development) find_package(PythonLibs REQUIRED) #list(APPEND CMAKE_MODULE_PATH "/home/epagris/.local/lib/python3.8/site-packages/skbuild/resources/cmake/") #find_package(PythonExtensions REQUIRED) find_package(pybind11 REQUIRED) set(CMAKE_CXX_STANDARD 17) set(SRC src/wfsmodule.cpp) pybind11_add_module(pywfs src/wfsmodule.cpp) target_include_directories(pywfs PUBLIC ${PROJECT_SOURCE_DIR}/../libwfr/src) add_dependencies(pywfs wfr) target_compile_definitions(pywfs PRIVATE VERSION_INFO=${EXAMPLE_VERSION_INFO}) target_include_directories(pywfs PUBLIC ${PYTHON_INCLUDE_DIRS}) target_link_libraries(pywfs PUBLIC wfr) set_target_properties(pywfs PROPERTIES SUFFIX ".so") install(TARGETS pywfs DESTINATION ${PROJECT_SOURCE_DIR}/module)