diff --git a/oxpy/CMakeLists.txt b/oxpy/CMakeLists.txt index 1d9c10299..15538b914 100644 --- a/oxpy/CMakeLists.txt +++ b/oxpy/CMakeLists.txt @@ -20,10 +20,10 @@ IF(Python) SET(CMAKE_SHARED_LIBRARY_PREFIX "") # we need the oxDNA "common" library to be compiled so that the resulting code is position-independent and the library can be linked dynamically - SET_TARGET_PROPERTIES(oxdna_common PROPERTIES POSITION_INDEPENDENT_CODE ON) + SET_TARGET_PROPERTIES(${lib_name} PROPERTIES POSITION_INDEPENDENT_CODE ON) ADD_LIBRARY(_oxpy_lib STATIC ${oxpy_SOURCES}) - TARGET_LINK_LIBRARIES(_oxpy_lib ${PYTHON_LIBRARIES} oxdna_common) + TARGET_LINK_LIBRARIES(_oxpy_lib ${PYTHON_LIBRARIES} ${lib_name}) SET_TARGET_PROPERTIES(_oxpy_lib PROPERTIES POSITION_INDEPENDENT_CODE ON) pybind11_add_module(core SHARED bindings.cpp) TARGET_LINK_LIBRARIES(core PRIVATE _oxpy_lib)