From edfcb22353cfc5a232b180b5039cb9363e697a49 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Sat, 2 Dec 2017 00:18:31 -0500 Subject: [PATCH] COMP: Add SEMConfigure.h and update config with SlicerExecutionModel_USE_ITKFactoryRegistration This variable will allow to conditionally configure and build CLI to support ITKFactoryRegistration library. --- CMake/SEMConfigure.h.in | 8 ++++++++ CMakeLists.txt | 10 ++++++++++ SlicerExecutionModelConfig.cmake.in | 3 +++ 3 files changed, 21 insertions(+) create mode 100644 CMake/SEMConfigure.h.in diff --git a/CMake/SEMConfigure.h.in b/CMake/SEMConfigure.h.in new file mode 100644 index 0000000..862c31e --- /dev/null +++ b/CMake/SEMConfigure.h.in @@ -0,0 +1,8 @@ +#ifndef SEMConfigure_h +#define SEMConfigure_h + +#cmakedefine SlicerExecutionModel_USE_JSONCPP +#cmakedefine SlicerExecutionModel_USE_SERIALIZER +#cmakedefine SlicerExecutionModel_USE_ITKFactoryRegistration + +#endif diff --git a/CMakeLists.txt b/CMakeLists.txt index 81d6258..8493125 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -161,6 +161,15 @@ add_subdirectory(ModuleDescriptionParser) SETIFEMPTY(GenerateCLP_DIR ${CMAKE_CURRENT_BINARY_DIR}/GenerateCLP CACHE PATH "Location of GenerateCLPConfig.cmake" FORCE) add_subdirectory(GenerateCLP) +# -------------------------------------------------------------------------- +# SEMConfigure header +# -------------------------------------------------------------------------- +set(configure_header_file SEMConfigure.h) +configure_file( + CMake/${configure_header_file}.in + ${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file} + ) + # -------------------------------------------------------------------------- # Set INCLUDE_DIRS variable # -------------------------------------------------------------------------- @@ -175,6 +184,7 @@ set(${PROJECT_NAME}_INCLUDE_DIRS ${ModuleDescriptionParser_INCLUDE_DIRS} ${GenerateCLP_INCLUDE_DIRS} ${TCLAP_INCLUDE_DIRS} + ${CMAKE_CURRENT_BINARY_DIR} ${_additional_include_dirs} CACHE INTERNAL "${PROJECT_NAME} include dirs" FORCE ) diff --git a/SlicerExecutionModelConfig.cmake.in b/SlicerExecutionModelConfig.cmake.in index dd9374c..4f705eb 100644 --- a/SlicerExecutionModelConfig.cmake.in +++ b/SlicerExecutionModelConfig.cmake.in @@ -51,6 +51,9 @@ if(SlicerExecutionModel_USE_SERIALIZER AND NOT SlicerExecutionModel_USE_JSONCPP) Make sure SlicerExecutionModel_USE_JSONCPP is ON.") endif() +# SlicerExecutionModel_USE_ITKFactoryRegistration +set(SlicerExecutionModel_USE_ITKFactoryRegistration @SlicerExecutionModel_USE_ITKFactoryRegistration@) + # Set SlicerExecutionModel variables set(SlicerExecutionModel_INCLUDE_DIRS "@SlicerExecutionModel_INCLUDE_DIRS_CONFIG@"