From 7a0c5b8ee3dbafe3d4728af77b101237d5e45506 Mon Sep 17 00:00:00 2001 From: Lorenzo Rovigatti Date: Wed, 7 Sep 2022 23:15:32 +0200 Subject: [PATCH] Make it possible to compile oxpy with -DDebug=True --- oxpy/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)