1 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 find_package(SWIG REQUIRED)
4 include(${SWIG_USE_FILE})
6 #TODO(spo): is -threads necessary?
7 set(CMAKE_SWIG_FLAGS -threads -Wall)
10 # Add to ModuleName.i before any %inlcude:
11 # %include "doxyhelp.i"
12 # Add to CMakeLists.txt before SWIG_ADD_MODULE(...):
13 # SET(SWIG_MODULE_ModuleName_EXTRA_DEPS ${SWIG_MODULE_ModuleName_EXTRA_DEPS} doxyhelp.i)
15 #TODO(spo): why not use FindDoxygen.cmake module?
17 find_program(DOXYGEN_EXECUTABLE Doxygen)
19 find_program(DOXYGEN_EXECUTABLE doxygen)
22 set(EXCLUDE_DOC_DIR "*/Test/* */Mock/*")
24 configure_file(${PROJECT_SOURCE_DIR}/doc/swig/doxyfile.in doxyfile @ONLY)
27 foreach(it "*.h;*.cpp;*.hpp;*.cxx")
28 file(GLOB doc_source RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${it})
29 list(APPEND doc_sources ${doc_source})
31 #message(STATUS "${doc_sources}")
33 add_custom_command(OUTPUT doxyhelp.i
34 COMMAND "${DOXYGEN_EXECUTABLE}"
35 COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/scripts/doxy2swig.py xml/index.xml doxyhelp.i
36 DEPENDS ${doc_sources} ${PROJECT_SOURCE_DIR}/doc/swig/doxyfile.in