Skip to content
Snippets Groups Projects
Commit f5522669 authored by AlQuemist's avatar AlQuemist
Browse files

PyCore/CMakeLists.txt: add 'swig_runtime.h' to include files and dependency

parent 8b599586
No related branches found
No related tags found
1 merge request!2357Avoid unnecessary rebuilding of the SWIG wrappers
......@@ -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})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment