From 457f870c3c0e489acff32da9652a188fd7dd6c00 Mon Sep 17 00:00:00 2001 From: Paul Dechamps <paul.dechamps@uliege.be> Date: Thu, 30 Nov 2023 11:22:05 +0100 Subject: [PATCH] (build) Fix build with dartflo submodule Modified CMakeLists.txt files to find amfe in dartflo subdirectory and linked dart, tbox and fwk libs with blast through swig. Changed root run.py file to find amfe. --- CMakeLists.txt | 2 +- blast/_src/CMakeLists.txt | 7 ++++--- modules/CMakeLists.txt | 1 + run.py | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 modules/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index a21aa56..fc6eb8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,7 +117,7 @@ IF(UNIX) ENDIF() # -- Sub directories -ADD_SUBDIRECTORY( amfe ) +ADD_SUBDIRECTORY( modules ) ADD_SUBDIRECTORY( blast ) # -- FINAL diff --git a/blast/_src/CMakeLists.txt b/blast/_src/CMakeLists.txt index 0fdd32e..b24d48d 100644 --- a/blast/_src/CMakeLists.txt +++ b/blast/_src/CMakeLists.txt @@ -26,10 +26,11 @@ SET_PROPERTY(TARGET blastw PROPERTY SWIG_USE_TARGET_INCLUDE_DIRECTORIES ON) MACRO_DebugPostfix(blastw) TARGET_INCLUDE_DIRECTORIES(blastw PRIVATE ${PROJECT_SOURCE_DIR}/blast/_src - ${PROJECT_SOURCE_DIR}/amfe/tbox/_src - ${PROJECT_SOURCE_DIR}/amfe/fwk/_src + ${PROJECT_SOURCE_DIR}/modules/dartflo/dart/_src + ${PROJECT_SOURCE_DIR}/modules/dartflo/ext/amfe/tbox/_src + ${PROJECT_SOURCE_DIR}/modules/dartflo/ext/amfe/fwk/_src ${PYTHON_INCLUDE_PATH}) -TARGET_LINK_LIBRARIES(blastw PRIVATE blast tbox fwk ${PYTHON_LIBRARIES}) +TARGET_LINK_LIBRARIES(blastw PRIVATE blast dart tbox fwk ${PYTHON_LIBRARIES}) INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/\${BUILD_TYPE}/blastw.py DESTINATION ${CMAKE_INSTALL_PREFIX}) INSTALL(TARGETS blastw DESTINATION ${CMAKE_INSTALL_PREFIX}) diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt new file mode 100644 index 0000000..9a558a8 --- /dev/null +++ b/modules/CMakeLists.txt @@ -0,0 +1 @@ +ADD_SUBDIRECTORY( dartflo ) \ No newline at end of file diff --git a/run.py b/run.py index ab76a3c..61cb32b 100755 --- a/run.py +++ b/run.py @@ -22,9 +22,9 @@ def main(): import os.path, sys # adds fwk/tbox to the python path thisdir = os.path.split(os.path.abspath(__file__))[0] - fwkdir = os.path.abspath(os.path.join(thisdir, 'amfe')) + fwkdir = os.path.abspath(os.path.join(thisdir, 'modules/dartflo/ext/amfe')) if not os.path.isdir(fwkdir): - raise Exception('blaster/amfe not found!\n') + raise Exception('blaster/modules/dartflo/amfe not found!\n') sys.path.append(fwkdir) # adds "." to the pythonpath sys.path.append(thisdir) -- GitLab