diff --git a/conanfile.py b/conanfile.py index a1649b5..a2ef945 100644 --- a/conanfile.py +++ b/conanfile.py @@ -81,8 +81,6 @@ def config_options(self): del self.options.with_python_bindings def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") if self.options.get_safe("with_python_bindings", False): self.options["cpython"].shared = True diff --git a/pyDulcificum/CMakeLists.txt b/pyDulcificum/CMakeLists.txt index c49c4a9..b3ba53c 100644 --- a/pyDulcificum/CMakeLists.txt +++ b/pyDulcificum/CMakeLists.txt @@ -1,8 +1,10 @@ - find_package(pybind11 REQUIRED) +set(ENV{LD_LIBRARY_PATH} "${CMAKE_LIBRARY_PATH}:${LD_LIBRARY_PATH}") # Needed to ensure that CMake finds the Conan CPython library +find_package(Python COMPONENTS Interpreter Development) +find_package(pybind11 REQUIRED) - pybind11_add_module(pyDulcificum pyDulcificum.cpp) - target_link_libraries(pyDulcificum PUBLIC dulcificum pybind11::pybind11) - target_compile_definitions(pyDulcificum PRIVATE PYDULCIFICUM_VERSION="${PYDULCIFICUM_VERSION}") - if(NOT MSVC AND NOT ${CMAKE_BUILD_TYPE} MATCHES Debug|RelWithDebInfo) - pybind11_strip(pyDulcificum) - endif() \ No newline at end of file +pybind11_add_module(pyDulcificum pyDulcificum.cpp) +target_link_libraries(pyDulcificum PUBLIC dulcificum pybind11::pybind11) +target_compile_definitions(pyDulcificum PRIVATE PYDULCIFICUM_VERSION="${PYDULCIFICUM_VERSION}") +if(NOT MSVC AND NOT ${CMAKE_BUILD_TYPE} MATCHES Debug|RelWithDebInfo) + pybind11_strip(pyDulcificum) +endif()