2 # This function is used to prepare all includes and files 3 # that are necessary for a general swig project. 5 # Ensure that the input file is parsed as a c++ file. This is done via
6 # an additional source file property.
7 set_source_files_properties ( ${swig_file} PROPERTIES CPLUSPLUS ON )
9 # This variable is used to add additional parameters to SWIG.
10 # Using a list is necessary
in order to be able to pass multiple parameters
11 # which are given as optional parameters to the input file.
12 set(ADDITIONAL_TMP_SWIG_INCLUDES
"")
14 foreach(library_name ${library_names})
15 # Extracting all include directories from each given project and
16 # then including these directories to the newly created swig project.
17 get_property(LIBRARY_INCLUDES
19 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
20 # Adding each include path as an additional swig parameter
using 21 # the swig-option
"-I":
22 foreach(INCLUDE_PATH ${LIBRARY_INCLUDES})
23 list(APPEND ADDITIONAL_TMP_SWIG_INCLUDES -I${INCLUDE_PATH} )
25 file(GLOB_RECURSE header_files
"${INCLUDE_PATH}/*.h")
26 list(APPEND SWIG_MODULE_${swig_module}_EXTRA_DEPS ${header_files})
27 # export variable to parent scope
28 set(SWIG_MODULE_${swig_module}_EXTRA_DEPS
29 ${SWIG_MODULE_${swig_module}_EXTRA_DEPS} PARENT_SCOPE)
34 # Add the Common Folder to the include system of SWIG 35 list(APPEND ADDITIONAL_TMP_SWIG_INCLUDES -I${MITK_WRAPPING_COMMON_DIR} )
37 # This is necessary, because SWIG hard-codeds the integer size. See
39 if(
"${CMAKE_CXX_COMPILER_ID}" STREQUAL
"GNU")
40 list(APPEND ADDITIONAL_TMP_SWIG_INCLUDES -DSWIGWORDSIZE64)
44 # Set the additional parameters to the input project file: 45 set_property(SOURCE ${swig_file} PROPERTY SWIG_FLAGS ${ADDITIONAL_TMP_SWIG_INCLUDES} )
47 # In addition include python dependencies:
48 include_directories( ${PYTHON_INCLUDE_DIR})
49 list(APPEND SWIG_MODULE_${swig_module}_EXTRA_DEPS ${PYTHON_INCLUDE_DIR})
51 # Add additional include paths,
for example to the common files:
52 list(APPEND SWIG_MODULE_${swig_module}_EXTRA_DEPS ${SWIG_EXTRA_DEPS})
54 set(SWIG_MODULE_${swig_module}_EXTRA_DEPS
55 ${SWIG_MODULE_${swig_module}_EXTRA_DEPS} PARENT_SCOPE)
mitkSwigPrepareFiles(swig_module, swig_file, library_names)
static bool in(Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4)