Commit c8fc4cc3 authored by jcfr's avatar jcfr

COMP: Slicer CLIs can now be built using SEMMacroBuildCLI macro

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20393 3bd1e089-480b-0410-8dfb-8563597acbee
parent cc39cc7a
......@@ -6,21 +6,25 @@ project(SlicerBaseCLI)
find_package(SlicerExecutionModel REQUIRED ModuleDescriptionParser)
# --------------------------------------------------------------------------
# Update Slicer_BaseCLI_INCLUDE_DIRS
# Include dirs
# --------------------------------------------------------------------------
set(Slicer_BaseCLI_INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
CACHE INTERNAL "Slicer BaseCLI includes" FORCE)
# --------------------------------------------------------------------------
# Include dirs
# --------------------------------------------------------------------------
)
set(include_dirs
${Slicer_BaseCLI_INCLUDE_DIRS}
${ModuleDescriptionParser_INCLUDE_DIRS}
)
include_directories(${include_dirs})
# --------------------------------------------------------------------------
# Update SlicerExecutionModel_EXTRA_INCLUDE_DIRECTORIES
# --------------------------------------------------------------------------
set(SlicerExecutionModel_EXTRA_INCLUDE_DIRECTORIES
${SlicerExecutionModel_EXTRA_INCLUDE_DIRECTORIES} ${Slicer_BaseCLI_INCLUDE_DIRS}
CACHE INTERNAL "SlicerExecutionModel extra includes" FORCE
)
# --------------------------------------------------------------------------
# Update Slicer_Base_INCLUDE_DIRS
# --------------------------------------------------------------------------
......
set(KIT ${PROJECT_NAME})
slicerMacroBuildCLI(
SEMMacroBuildCLI(
NAME CLIModule4Test
LOGO_HEADER ${Slicer_SOURCE_DIR}/Resources/ITKLogo.h
NO_INSTALL
......
......@@ -88,10 +88,6 @@ set(Slicer_Libs_VTK_WRAPPED_LIBRARIES "@Slicer_Libs_VTK_WRAPPED_LIBRARIES@")
# Slicer Libs include file directories.
set(Slicer_Libs_INCLUDE_DIRS "@Slicer_Libs_INCLUDE_DIRS_CONFIG@")
# HACK Expose SlicerBaseCLI_INCLUDE_DIRS so that slicerMacroBuildCLI works
# Ideally we would like to move the files from SlicerBaseCLI into the SlicerExecutionModel
set(Slicer_BaseCLI_INCLUDE_DIRS "@Slicer_BaseCLI_INCLUDE_DIRS@")
# Slicer Base include file directories.
set(Slicer_Base_INCLUDE_DIRS "@Slicer_BINARY_DIR@" "@Slicer_Base_INCLUDE_DIRS_CONFIG@")
......@@ -273,6 +269,9 @@ slicer_config_set_ep(
"@SLICERLIBCURL_DIR_CONFIG@"
CACHE PATH "Path to Curl build or install directory" FORCE)
# SlicerExecutionModel extra include directories
set(SlicerExecutionModel_EXTRA_INCLUDE_DIRECTORIES "@SlicerExecutionModel_EXTRA_INCLUDE_DIRECTORIES_CONFIG@")
slicer_config_set_ep(
SlicerExecutionModel_DIR
"@SlicerExecutionModel_DIR_CONFIG@"
......
......@@ -99,6 +99,10 @@ if(Slicer_USE_PYTHONQT)
list(APPEND Slicer_EXTERNAL_PROJECTS_NO_USEFILE_CONFIG PythonLibs PythonInterp)
endif()
if(Slicer_BUILD_CLI_SUPPORT)
set(SlicerExecutionModel_EXTRA_INCLUDE_DIRECTORIES_CONFIG ${SlicerExecutionModel_EXTRA_INCLUDE_DIRECTORIES})
endif()
# Export Targets file.
set(Slicer_TARGETS_FILE "${Slicer_BINARY_DIR}/SlicerTargets.cmake")
......
......@@ -39,7 +39,7 @@ macro(slicerMacroBuildCLI)
ADDITIONAL_SRCS ${MY_SLICER_ADDITIONAL_SRCS}
TARGET_LIBRARIES ${MY_SLICER_TARGET_LIBRARIES}
LINK_DIRECTORIES ${MY_SLICER_LINK_DIRECTORIES}
INCLUDE_DIRECTORIES "${MY_SLICER_INCLUDE_DIRECTORIES};${Slicer_BaseCLI_INCLUDE_DIRS}"
INCLUDE_DIRECTORIES "${MY_SLICER_INCLUDE_DIRECTORIES}"
NAME ${MY_SLICER_NAME}
LOGO_HEADER ${MY_SLICER_LOGO_HEADER}
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${Slicer_CLIMODULES_BIN_DIR}"
......
......@@ -674,6 +674,11 @@ if(Slicer_USE_OpenIGTLink)
include(${OpenIGTLink_USE_FILE})
endif()
#-----------------------------------------------------------------------------
# SlicerExecutionModel settings
#-----------------------------------------------------------------------------
set(SlicerExecutionModel_EXTRA_INCLUDE_DIRECTORIES "" CACHE INTERNAL "SlicerExecutionModel extra includes" FORCE)
#-----------------------------------------------------------------------------
# Set Slicer buildin libraries *_DIR variables
#-----------------------------------------------------------------------------
......
......@@ -36,7 +36,7 @@ if(NOT DEFINED SlicerExecutionModel_DIR)
ExternalProject_Add(${proj}
GIT_REPOSITORY "${git_protocol}://github.com/Slicer/SlicerExecutionModel.git"
GIT_TAG "6543a3d9dc21078b544d4071973aa5c46993809d"
GIT_TAG "d79a25543ee101e6f5a12be9dd41f1b6e0c9b6aa"
SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
BINARY_DIR ${proj}-build
UPDATE_COMMAND ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment