diff --git a/oxpy/CMakeLists.txt b/oxpy/CMakeLists.txt index 15538b914..1d9c10299 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(${lib_name} PROPERTIES POSITION_INDEPENDENT_CODE ON) + SET_TARGET_PROPERTIES(oxdna_common PROPERTIES POSITION_INDEPENDENT_CODE ON) ADD_LIBRARY(_oxpy_lib STATIC ${oxpy_SOURCES}) - TARGET_LINK_LIBRARIES(_oxpy_lib ${PYTHON_LIBRARIES} ${lib_name}) + TARGET_LINK_LIBRARIES(_oxpy_lib ${PYTHON_LIBRARIES} oxdna_common) SET_TARGET_PROPERTIES(_oxpy_lib PROPERTIES POSITION_INDEPENDENT_CODE ON) pybind11_add_module(core SHARED bindings.cpp) TARGET_LINK_LIBRARIES(core PRIVATE _oxpy_lib) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2485b701c..a5f0b3afc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,14 +1,13 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) +SET(lib_name oxdna_common) + IF(CMAKE_BUILD_TYPE MATCHES Debug) SET(exe_name oxDNA_debug) - SET(lib_name oxdna_common_debug) ELSEIF(MPI) SET(exe_name oxDNA_mpi) - SET(lib_name oxdna_common) ELSE() SET(exe_name oxDNA) - SET(lib_name oxdna_common) ENDIF() SET(observables_SOURCES