From f552266974c332bd9dab09e060eced7dcf2e28b5 Mon Sep 17 00:00:00 2001 From: AlQuemist <alquemist@Lyriks> Date: Mon, 5 Feb 2024 16:10:20 +0100 Subject: [PATCH] PyCore/CMakeLists.txt: add 'swig_runtime.h' to include files and dependency --- PyCore/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PyCore/CMakeLists.txt b/PyCore/CMakeLists.txt index 2ad73e555ce..bf6774d0286 100644 --- a/PyCore/CMakeLists.txt +++ b/PyCore/CMakeLists.txt @@ -14,6 +14,7 @@ set(lib BornAgain${component}) # Python-dependent source files file(GLOB_RECURSE source_files */*.cpp) file(GLOB_RECURSE include_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} */*.h) +list(APPEND include_files "${AUTO_WRAP_DIR}/swig_runtime.h") # --- define target properties --- add_library(${lib} SHARED) @@ -24,6 +25,10 @@ set_target_properties(${lib} PROPERTIES INCLUDE_FILES "${include_files}" EMBED_PYTHON ${BORNAGAIN_PYTHON}) +if(CONFIGURE_BINDINGS) + add_dependencies(${lib} swig_runtime) +endif(CONFIGURE_BINDINGS) + # --- make the library --- MakeLib(${lib}) -- GitLab