Commit 940ff43b authored by barre's avatar barre
Browse files

ENH: allow a module (Modules/GradientAnisotropicDiffusionFilter for now) to be...

ENH: allow a module (Modules/GradientAnisotropicDiffusionFilter for now) to be built in a standalone fashion against eithera Slicer3 build or Slicer3 installed. Update the config files accordingly, add missing installation rules, etc. Also unscreamify and indent many CMakeLists.txt in the process.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@6552 3bd1e089-480b-0410-8dfb-8563597acbee
parent 1ff80ccd
PROJECT( Applications )
project(Applications)
IF(BUILD_CLI)
SUBDIRS(CLI)
ENDIF(BUILD_CLI)
if(BUILD_CLI)
subdirs(CLI)
endif(BUILD_CLI)
SUBDIRS(
subdirs(
GUI
#SIGN
)
)
IF (Slicer3_BUILD_TESTING)
SUBDIRS( Testing )
ENDIF (Slicer3_BUILD_TESTING)
if(Slicer3_BUILD_TESTING)
subdirs(Testing)
endif(Slicer3_BUILD_TESTING)
PROJECT( GUI )
project(GUI)
#########################################################################
# Enable shared link forwarding support if needed.
SET(SLICER_EXE_SUFFIX)
SET(SLICER_EXE_INSTALL ${SLICER_INSTALL_BIN_DIR})
IF(BUILD_SHARED_LIBS)
SET(SLICER_NEED_SHARED_FORWARD 1)
SET(SLICER_EXE_SUFFIX -real)
SET(SLICER_EXE_INSTALL ".")
SET(SLICER_FORWARD_DIR_BUILD "${EXECUTABLE_OUTPUT_PATH}")
SET(SLICER_FORWARD_DIR_INSTALL "${SLICER_EXE_INSTALL}")
SET(SLICER_FORWARD_PATH_BUILD "\"${SLICER_FORWARD_DIR_BUILD}\",\"${KWWidgets_RUNTIME_DIRS}\",\"${VTK_DIR}/bin\"")
IF(WIN32)
SET(SLICER_FORWARD_PATH_INSTALL
set(SLICER_EXE_SUFFIX)
set(SLICER_EXE_INSTALL ${SLICER_INSTALL_BIN_DIR})
if(BUILD_SHARED_LIBS)
set(SLICER_NEED_SHARED_FORWARD 1)
set(SLICER_EXE_SUFFIX -real)
set(SLICER_EXE_INSTALL ".")
set(SLICER_FORWARD_DIR_BUILD "${EXECUTABLE_OUTPUT_PATH}")
set(SLICER_FORWARD_DIR_INSTALL "${SLICER_EXE_INSTALL}")
set(SLICER_FORWARD_PATH_BUILD "\"${SLICER_FORWARD_DIR_BUILD}\",\"${KWWidgets_RUNTIME_DIRS}\",\"${VTK_DIR}/bin\"")
if(WIN32)
set(SLICER_FORWARD_PATH_INSTALL
"\"../lib/Slicer3/tcl/bin\"")
ELSE(WIN32)
SET(SLICER_FORWARD_PATH_INSTALL
else(WIN32)
set(SLICER_FORWARD_PATH_INSTALL
"\"../lib\",\"../lib/KWWidgets\",\"../lib/InsightToolkit\",\"../lib/Slicer3/tcl/lib\"")
ENDIF(WIN32)
ENDIF(BUILD_SHARED_LIBS)
endif(WIN32)
endif(BUILD_SHARED_LIBS)
# Add main server executables.
SET(SLICER_EXE_LIST Slicer3)
set(SLICER_EXE_LIST Slicer3)
# Add shared link forwarding executables if necessary.
IF(SLICER_NEED_SHARED_FORWARD)
FOREACH(slicer_exe ${SLICER_EXE_LIST})
SET(SLICER_FORWARD_EXE ${slicer_exe}${SLICER_EXE_SUFFIX})
CONFIGURE_FILE(
if(SLICER_NEED_SHARED_FORWARD)
foreach(slicer_exe ${SLICER_EXE_LIST})
set(SLICER_FORWARD_EXE ${slicer_exe}${SLICER_EXE_SUFFIX})
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/Slicer3-forward.c.in
${CMAKE_CURRENT_BINARY_DIR}/${slicer_exe}-forward.c
@ONLY IMMEDIATE)
ADD_EXECUTABLE(${slicer_exe} WIN32
add_executable(${slicer_exe} WIN32
${CMAKE_CURRENT_BINARY_DIR}/${slicer_exe}-forward.c)
ADD_DEPENDENCIES(${slicer_exe} ${slicer_exe}${SLICER_EXE_SUFFIX})
INSTALL(TARGETS ${slicer_exe}
add_dependencies(${slicer_exe} ${slicer_exe}${SLICER_EXE_SUFFIX})
install(TARGETS ${slicer_exe}
DESTINATION bin
COMPONENT Runtime)
ENDFOREACH(slicer_exe)
ENDIF(SLICER_NEED_SHARED_FORWARD)
endforeach(slicer_exe)
endif(SLICER_NEED_SHARED_FORWARD)
SET (SRC
Slicer3.cxx
)
set(SRC
Slicer3.cxx
)
# --------------------------------------------------------------------------
# Find SLICERLIBCURL (slicercurl)
FIND_PACKAGE(SLICERLIBCURL REQUIRED)
INCLUDE(${SLICERLIBCURL_USE_FILE})
find_package(SLICERLIBCURL REQUIRED)
include(${SLICERLIBCURL_USE_FILE})
# --------------------------------------------------------------------------
# Include dirs
# MESSAGE(STATUS "Setting up dir_list, Qdec bin dir = ${Qdec_BINARY_DIR}, Qdec src dir = ${Qdec_SOURCE_DIR}")
SET(dir_list
${SlicerBase_SOURCE_DIR}
${SlicerBase_BINARY_DIR}
${SlicerBaseLogic_SOURCE_DIR}
${SlicerBaseLogic_BINARY_DIR}
${SlicerBaseGUI_SOURCE_DIR}
${SlicerBaseGUI_BINARY_DIR}
${MRML_SOURCE_DIR}
${MRML_BINARY_DIR}
${IGT_SOURCE_DIR}
${IGT_BINARY_DIR}
set(dir_list
${Slicer3_INCLUDE_DIRS}
${NAVITRACK_INC}
${IGSTK_INCLUDE_DIRS}
${Volumes_SOURCE_DIR}
${Volumes_BINARY_DIR}
${Volumes_Init_SOURCE_DIR}
......@@ -95,8 +88,6 @@ SET(dir_list
${NeuroNav_BINARY_DIR}
${NeuroNav_Init_SOURCE_DIR}
${NeuroNav_Init_BINARY_DIR}
${Qdec_SOURCE_DIR}
${Qdec_BINARY_DIR}
${QdecModule_SOURCE_DIR}
${QdecModule_BINARY_DIR}
${QdecModule_Init_SOURCE_DIR}
......@@ -127,31 +118,22 @@ SET(dir_list
${SlicerDaemon_BINARY_DIR}
${SlicerDaemon_Init_SOURCE_DIR}
${SlicerDaemon_Init_BINARY_DIR}
${ModuleDescriptionParser_SOURCE_DIR}
${LoadableModule_SOURCE_DIR}
${LoadableModule_BINARY_DIR}
${VTK_INCLUDE_DIR}
${NAVITRACK_INC}
${IGSTK_INCLUDE_DIRS}
${RemoteIO_SOURCE_DIR}
${RemoteIO_BINARY_DIR}
${SLICERLIBCURL_INCLUDE_DIRS}
)
IF(BUILD_MODULES)
ADD_DEFINITIONS(-DBUILD_MODULES)
ENDIF(BUILD_MODULES)
if(BUILD_MODULES)
add_definitions(-DBUILD_MODULES)
endif(BUILD_MODULES)
IF(BUILD_CLI)
ADD_DEFINITIONS(-DBUILD_CLI)
ENDIF(BUILD_CLI)
if(BUILD_CLI)
add_definitions(-DBUILD_CLI)
endif(BUILD_CLI)
IF(USE_PYTHON AND PYTHON_INCLUDE_PATH)
SET(dir_list ${dir_list} ${PYTHON_INCLUDE_PATH})
ADD_DEFINITIONS(-DUSE_PYTHON)
ENDIF(USE_PYTHON AND PYTHON_INCLUDE_PATH)
if(USE_PYTHON AND PYTHON_INCLUDE_PATH)
set(dir_list ${dir_list} ${PYTHON_INCLUDE_PATH})
add_definitions(-DUSE_PYTHON)
endif(USE_PYTHON AND PYTHON_INCLUDE_PATH)
INCLUDE_DIRECTORIES(${dir_list})
include_directories(${dir_list})
# On Win32 platforms, let's configure the KWWidgets sample resource file
# to get a nice application icon and some additional information.
......@@ -174,56 +156,49 @@ INCLUDE_DIRECTORIES(${dir_list})
# with the WIN32_CONSOLE you can see diagnostic output on in a DOS-style
# cmd window
#
OPTION(Slicer3_BUILD_WIN32_CONSOLE "Build Slicer3 executable as a console app on windows (allows debug output)" OFF)
IF ( Slicer3_BUILD_WIN32_CONSOLE )
ADD_EXECUTABLE (Slicer3${SLICER_EXE_SUFFIX} ${SRC} ${RC_FILENAME})
ELSE ( Slicer3_BUILD_WIN32_CONSOLE )
ADD_EXECUTABLE (Slicer3${SLICER_EXE_SUFFIX} WIN32 ${SRC} ${RC_FILENAME})
ENDIF ( Slicer3_BUILD_WIN32_CONSOLE )
IF(WFENGINEMODULE)
SET(WFENGINE_LINK_LIB ${WFENGINE_LINK_LIB} WFEngineModule)
ELSE(WFENGINEMODULE)
ADD_DEFINITIONS(-DWFENGINE_DEBUG)
ENDIF(WFENGINEMODULE)
option(Slicer3_BUILD_WIN32_CONSOLE "Build Slicer3 executable as a console app on windows (allows debug output)" OFF)
if(Slicer3_BUILD_WIN32_CONSOLE)
add_executable(Slicer3${SLICER_EXE_SUFFIX} ${SRC} ${RC_FILENAME})
else(Slicer3_BUILD_WIN32_CONSOLE)
add_executable(Slicer3${SLICER_EXE_SUFFIX} WIN32 ${SRC} ${RC_FILENAME})
endif(Slicer3_BUILD_WIN32_CONSOLE)
if(WFENGINEMODULE)
set(WFENGINE_LINK_LIB ${WFENGINE_LINK_LIB} WFEngineModule)
else(WFENGINEMODULE)
add_definitions(-DWFENGINE_DEBUG)
endif(WFENGINEMODULE)
# Option for VolumeRendering
IF(VOLUMERENDERINGMODULE)
SET(VOLUMERENDERINGMODULE_LINK_LIB VolumeRenderingModule)
ELSE(VOLUMERENDERINGMODULE)
ADD_DEFINITIONS(-DVOLUMERENDERINGMODULE_DEBUG)
ENDIF(VOLUMERENDERINGMODULE)
if(VOLUMERENDERINGMODULE)
set(VOLUMERENDERINGMODULE_LINK_LIB VolumeRenderingModule)
else(VOLUMERENDERINGMODULE)
add_definitions(-DVOLUMERENDERINGMODULE_DEBUG)
endif(VOLUMERENDERINGMODULE)
# Option for LabelStatistics
IF(LABELSTATISTICS)
SET(LABELSTATISTICS_LINK_LIB LabelStatistics)
ELSE(LABELSTATISTICS)
ADD_DEFINITIONS(-DLABELSTATISTICS_DEBUG)
ENDIF(LABELSTATISTICS)
TARGET_LINK_LIBRARIES( Slicer3${SLICER_EXE_SUFFIX}
SlicerBaseLogic
SlicerBaseGUI
MRML
IGT
ModuleDescriptionParser
LoadableModule
vtkITK
ITKCommon
ITKIO
${KWWidgets_LIBRARIES}
Qdec
RemoteIO
${SLICERLIBCURL_LIBRARIES}
)
if(LABELSTATISTICS)
set(LABELSTATISTICS_LINK_LIB LabelStatistics)
else(LABELSTATISTICS)
add_definitions(-DLABELSTATISTICS_DEBUG)
endif(LABELSTATISTICS)
# Important: remove RemoteIO when using CMake 2.6. Couldn't be part of
# Slicer3_LIBRARIES right now because of the Cult lib RemoteIO is using is
# STATIC, but that's fixed in 2.6.
target_link_libraries(Slicer3${SLICER_EXE_SUFFIX}
${Slicer3_LIBRARIES}
RemoteIO
${KWWidgets_LIBRARIES}
# ${SLICERLIBCURL_LIBRARIES}
)
# MESSAGE(STATUS "Slicer lib curl libs = ${SLICERLIBCURL_LIBRARIES}")
# MESSAGE(STATUS "Slicer lib curl library dirs = ${SLICERLIBCURL_LIBRARY_DIRS}")
IF(BUILD_MODULES)
TARGET_LINK_LIBRARIES( Slicer3${SLICER_EXE_SUFFIX}
if(BUILD_MODULES)
target_link_libraries(Slicer3${SLICER_EXE_SUFFIX}
Volumes
GradientAnisotropicDiffusionFilter
EMSegment
......@@ -241,29 +216,29 @@ IF(BUILD_MODULES)
SlicerTractographyDisplay
SlicerTractographyFiducialSeeding
)
ENDIF(BUILD_MODULES)
IF(USE_PYTHON AND PYTHON_LIBRARIES)
ADD_DEFINITIONS(-DUSE_PYTHON)
TARGET_LINK_LIBRARIES( Slicer3${SLICER_EXE_SUFFIX} SlicerGUIPython)
IF (WIN32 AND PYTHON_DEBUG_LIBRARIES)
TARGET_LINK_LIBRARIES( Slicer3${SLICER_EXE_SUFFIX}
debug ${PYTHON_DEBUG_LIBRARIES}
optimized ${PYTHON_LIBRARIES})
ELSE (WIN32 AND PYTHON_DEBUG_LIBRARIES)
TARGET_LINK_LIBRARIES( Slicer3${SLICER_EXE_SUFFIX} ${PYTHON_LIBRARIES})
ENDIF (WIN32 AND PYTHON_DEBUG_LIBRARIES)
IF(NOT WIN32)
# Linux/Unix requires util library, but mac doesn't
IF (APPLE)
TARGET_LINK_LIBRARIES( Slicer3${SLICER_EXE_SUFFIX} )
ELSE (APPLE)
TARGET_LINK_LIBRARIES( Slicer3${SLICER_EXE_SUFFIX} util )
ENDIF (APPLE)
ENDIF(NOT WIN32)
ENDIF(USE_PYTHON AND PYTHON_LIBRARIES)
INSTALL_TARGETS(/bin Slicer3${SLICER_EXE_SUFFIX})
endif(BUILD_MODULES)
if(USE_PYTHON AND PYTHON_LIBRARIES)
add_definitions(-DUSE_PYTHON)
target_link_libraries(Slicer3${SLICER_EXE_SUFFIX} SlicerGUIPython)
if(WIN32 AND PYTHON_DEBUG_LIBRARIES)
target_link_libraries(Slicer3${SLICER_EXE_SUFFIX}
debug ${PYTHON_DEBUG_LIBRARIES}
optimized ${PYTHON_LIBRARIES})
else(WIN32 AND PYTHON_DEBUG_LIBRARIES)
target_link_libraries(Slicer3${SLICER_EXE_SUFFIX} ${PYTHON_LIBRARIES})
endif(WIN32 AND PYTHON_DEBUG_LIBRARIES)
if(NOT WIN32)
# Linux/Unix requires util library, but mac doesn't
if(APPLE)
target_link_libraries(Slicer3${SLICER_EXE_SUFFIX})
else(APPLE)
target_link_libraries(Slicer3${SLICER_EXE_SUFFIX} util)
endif(APPLE)
endif(NOT WIN32)
endif(USE_PYTHON AND PYTHON_LIBRARIES)
install_targets(/bin Slicer3${SLICER_EXE_SUFFIX})
# Generate a lightweight C launcher for a *specific* executable.
# The launcher sets up all the environments variables (PATH, TCLLIBPATH,
......@@ -275,51 +250,51 @@ INSTALL_TARGETS(/bin Slicer3${SLICER_EXE_SUFFIX})
# stored together in the installation tree, and a launcher should not be
# needed in that case).
INCLUDE("${KWWidgets_CMAKE_DIR}/KWWidgetsPathsMacros.cmake")
KWWidgets_GENERATE_SETUP_PATHS_LAUNCHER(
include("${KWWidgets_CMAKE_DIR}/KWWidgetsPathsMacros.cmake")
kwwidgets_generate_setup_paths_launcher(
"${CMAKE_CURRENT_BINARY_DIR}" "Slicer3Launcher" "" "Slicer3-real" "${TEEM_DIR}/bin")
# If needed, copy the Tcl/Tk support files required at run-time
# to initialize Tcl/Tk. This is only triggered if VTK was built
# against a Tcl/Tk static library.
INCLUDE("${KWWidgets_CMAKE_DIR}/KWWidgetsTclTkMacros.cmake")
KWWidgets_COPY_TCL_TK_SUPPORT_FILES("${Slicer3_BINARY_DIR}/lib")
KWWidgets_INSTALL_TCL_TK_SUPPORT_FILES("/lib")
include("${KWWidgets_CMAKE_DIR}/KWWidgetsTclTkMacros.cmake")
kwwidgets_copy_tcl_tk_support_files("${Slicer3_BINARY_DIR}/lib")
kwwidgets_install_tcl_tk_support_files("/lib")
#
# use the command line utilities
#
FIND_PACKAGE(GenerateCLP REQUIRED)
IF(GenerateCLP_FOUND)
INCLUDE(${GenerateCLP_USE_FILE})
ENDIF(GenerateCLP_FOUND)
find_package(GenerateCLP REQUIRED)
if(GenerateCLP_FOUND)
include(${GenerateCLP_USE_FILE})
endif(GenerateCLP_FOUND)
GENERATECLP(${SRC} Slicer3.xml)
generateclp(${SRC} Slicer3.xml)
#
# Command line parsing tests
#
ADD_TEST(Slicer3CLTest1 ${Slicer3_BINARY_DIR}/Slicer3 --no-splash --help)
ADD_TEST(Slicer3CLTest2 ${Slicer3_BINARY_DIR}/Slicer3 --xml --no-splash)
ADD_TEST(Slicer3CLTest3 ${Slicer3_BINARY_DIR}/Slicer3 --no-splash -f ${Slicer3_SOURCE_DIR}/Applications/GUI/Testing/TestScript.tcl)
ADD_TEST(Slicer3CLTest4 ${Slicer3_BINARY_DIR}/Slicer3 --no-splash --eval "puts testing ,. exit 0")
ADD_TEST(Slicer3CLTest5 ${Slicer3_BINARY_DIR}/Slicer3 --no-splash --exec "puts testing ,. exit 0")
ADD_TEST(Slicer3CLTest6 ${Slicer3_BINARY_DIR}/Slicer3 --no-splash --script ${Slicer3_SOURCE_DIR}/Applications/GUI/Testing/TestScript.tcl)
ADD_TEST(Slicer3CLTest7 ${Slicer3_BINARY_DIR}/Slicer3 --no-splash --script ${Slicer3_SOURCE_DIR}/Applications/GUI/Testing/LoadSceneTest.tcl)
ADD_TEST(Slicer3ScrollTest ${Slicer3_BINARY_DIR}/Slicer3 --no-splash --script ${Slicer3_SOURCE_DIR}/Applications/GUI/Testing/ScrollTesting.tcl)
add_test(Slicer3CLTest1 ${Slicer3_BINARY_DIR}/Slicer3 --no-splash --help)
add_test(Slicer3CLTest2 ${Slicer3_BINARY_DIR}/Slicer3 --xml --no-splash)
add_test(Slicer3CLTest3 ${Slicer3_BINARY_DIR}/Slicer3 --no-splash -f ${Slicer3_SOURCE_DIR}/Applications/GUI/Testing/TestScript.tcl)
add_test(Slicer3CLTest4 ${Slicer3_BINARY_DIR}/Slicer3 --no-splash --eval "puts testing ,. exit 0")
add_test(Slicer3CLTest5 ${Slicer3_BINARY_DIR}/Slicer3 --no-splash --exec "puts testing ,. exit 0")
add_test(Slicer3CLTest6 ${Slicer3_BINARY_DIR}/Slicer3 --no-splash --script ${Slicer3_SOURCE_DIR}/Applications/GUI/Testing/TestScript.tcl)
add_test(Slicer3CLTest7 ${Slicer3_BINARY_DIR}/Slicer3 --no-splash --script ${Slicer3_SOURCE_DIR}/Applications/GUI/Testing/LoadSceneTest.tcl)
add_test(Slicer3ScrollTest ${Slicer3_BINARY_DIR}/Slicer3 --no-splash --script ${Slicer3_SOURCE_DIR}/Applications/GUI/Testing/ScrollTesting.tcl)
#
# MRML Tests
#
ADD_TEST(Slicer3MRMLUndo ${Slicer3_BINARY_DIR}/Slicer3 --no-splash -f ${Slicer3_SOURCE_DIR}/Libs/MRML/Testing/testUndo.tcl)
ADD_TEST(Slicer3MRMLVolume ${Slicer3_BINARY_DIR}/Slicer3 --no-splash -f ${Slicer3_SOURCE_DIR}/Libs/MRML/Testing/testVolume.tcl)
add_test(Slicer3MRMLUndo ${Slicer3_BINARY_DIR}/Slicer3 --no-splash -f ${Slicer3_SOURCE_DIR}/Libs/MRML/Testing/testUndo.tcl)
add_test(Slicer3MRMLVolume ${Slicer3_BINARY_DIR}/Slicer3 --no-splash -f ${Slicer3_SOURCE_DIR}/Libs/MRML/Testing/testVolume.tcl)
#
# make the testing
#
IF (Slicer3_BUILD_TESTING)
SUBDIRS( Testing )
ENDIF (Slicer3_BUILD_TESTING)
if(Slicer3_BUILD_TESTING)
subdirs(Testing)
endif(Slicer3_BUILD_TESTING)
PROJECT( GUITesting )
project(GUITesting)
#####################
FIND_PACKAGE(GenerateCLP REQUIRED)
IF(GenerateCLP_FOUND)
INCLUDE(${GenerateCLP_USE_FILE})
ENDIF(GenerateCLP_FOUND)
find_package(GenerateCLP REQUIRED)
if(GenerateCLP_FOUND)
include(${GenerateCLP_USE_FILE})
endif(GenerateCLP_FOUND)
FIND_PACKAGE(vtkITK REQUIRED)
find_package(vtkITK REQUIRED)
LINK_DIRECTORIES(${ModuleDescriptionParser_BINARY_DIR})
link_directories(${ModuleDescriptionParser_BINARY_DIR})
FIND_PACKAGE(ITK REQUIRED)
INCLUDE(${ITK_USE_FILE})
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
FIND_PACKAGE(VTK REQUIRED)
INCLUDE(${VTK_USE_FILE})
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
set(CLP EventBrokerTest)
SET (CLP EventBrokerTest)
set(${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h)
link_directories(${vtkITK_LIB_DIR})
add_executable(${CLP} ${${CLP}_SOURCE})
target_link_libraries(${CLP}
${Slicer3_LIBRARIES}
)
SET ( ${CLP}_SOURCE ${CLP}.cxx )
GENERATECLP(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h)
LINK_DIRECTORIES(${vtkITK_LIB_DIR})
ADD_EXECUTABLE(${CLP} ${${CLP}_SOURCE})
TARGET_LINK_LIBRARIES (${CLP}
vtkITK vtkImaging vtkGraphics vtkIO
ITKIO
ModuleDescriptionParser
MRML
)
include_directories(
${Slicer3_INCLUDE_DIRS}
)
INCLUDE_DIRECTORIES(
${vtkITK_SOURCE_DIR}
${vtkITK_BINARY_DIR}
${MRML_SOURCE_DIR} ${MRML_BINARY_DIR}
)
SET(TEMP "${Slicer3_BINARY_DIR}/Testing/Temporary")
ADD_TEST(EventBrokerTest
set(TEMP "${Slicer3_BINARY_DIR}/Testing/Temporary")
add_test(EventBrokerTest
${Slicer3_BINARY_DIR}/Slicer3 --launch EventBrokerTest --logFileName ${TEMP}/EventLog.dot --graphFile ${TEMP}/EventBroker.dot)
PROJECT(SlicerBaseCLI)
project(SlicerBaseCLI)
CONFIGURE_FILE(
configure_file(
${SlicerBaseCLI_SOURCE_DIR}/vtkSlicerBaseCLIConfigure.h.in
${SlicerBaseCLI_BINARY_DIR}/vtkSlicerBaseCLIConfigure.h
)
)
INCLUDE_DIRECTORIES(
${ModuleDescriptionParser_BINARY_DIR}
${ModuleDescriptionParser_SOURCE_DIR}
set(include_dirs
${SlicerBaseCLI_BINARY_DIR}
${SlicerBaseCLI_SOURCE_DIR}
)
${ModuleDescriptionParser_BINARY_DIR}
${ModuleDescriptionParser_SOURCE_DIR}
)
include_directories(${include_dirs})
GET_PERSISTENT_PROPERTY(Slicer3_INCLUDE_DIRS tmp)
SET_PERSISTENT_PROPERTY(Slicer3_INCLUDE_DIRS ${tmp} ${include_dirs})
#
# Single library target. Down the road, we may want to have one library that only depends
# on ITK and a second library that only depends on VTK
# Single library target. Down the road, we may want to have one library that
# only depends on ITK and a second library that only depends on VTK
#
SET(SlicerBaseCLI_SRCS
vtkPluginFilterWatcher.cxx)
ADD_LIBRARY(SlicerBaseCLI ${SlicerBaseCLI_SRCS})
TARGET_LINK_LIBRARIES(SlicerBaseCLI vtkCommon ModuleDescriptionParser)
IF(BUILD_SHARED_LIBS)
INSTALL(TARGETS SlicerBaseCLI
RUNTIME DESTINATION bin COMPONENT RuntimeLibraries
LIBRARY DESTINATION lib/Slicer3 COMPONENT RuntimeLibraries
ARCHIVE DESTINATION lib/Slicer3 COMPONENT Development)
ENDIF(BUILD_SHARED_LIBS)
INSTALL(FILES itkPluginFilterWatcher.h itkPluginUtilities.h vtkPluginFilterWatcher.h vtkSlicerBaseCLIWin32Header.h
${SlicerBaseCLI_BINARY_DIR}/vtkSlicerBaseCLIConfigure.h
DESTINATION include/Slicer3 COMPONENT Development)
set(SlicerBaseCLI_SRCS
vtkPluginFilterWatcher.cxx)
add_library(SlicerBaseCLI ${SlicerBaseCLI_SRCS})
target_link_libraries(SlicerBaseCLI vtkCommon ModuleDescriptionParser)
GET_PERSISTENT_PROPERTY(Slicer3_LIBRARIES tmp)
SET_PERSISTENT_PROPERTY(Slicer3_LIBRARIES ${tmp} SlicerBaseCLI)
if(BUILD_SHARED_LIBS)
install(TARGETS SlicerBaseCLI
RUNTIME DESTINATION bin COMPONENT RuntimeLibraries
LIBRARY DESTINATION lib/Slicer3 COMPONENT RuntimeLibraries
ARCHIVE DESTINATION lib/Slicer3 COMPONENT Development)
endif(BUILD_SHARED_LIBS)
install(FILES
itkPluginFilterWatcher.h
itkPluginUtilities.h
vtkPluginFilterWatcher.h
vtkSlicerBaseCLIWin32Header.h
${SlicerBaseCLI_BINARY_DIR}/vtkSlicerBaseCLIConfigure.h
DESTINATION include/Slicer3 COMPONENT Development)
PROJECT( SlicerBase )
project(SlicerBase)
SUBDIRS(
Logic
GUI
CLI
)
subdirs(
Logic
GUI
CLI
)
if(Slicer3_BUILD_TESTING)
subdirs(Testing)
endif(Slicer3_BUILD_TESTING)
IF (Slicer3_BUILD_TESTING)
SUBDIRS( Testing )
ENDIF (Slicer3_BUILD_TESTING)
CONFIGURE_FILE(
configure_file(
${SlicerBase_SOURCE_DIR}/vtkSlicerConfigure.h.in
${SlicerBase_BINARY_DIR}/vtkSlicerConfigure.h
)
)
GET_PERSISTENT_PROPERTY(Slicer3_INCLUDE_DIRS tmp)
SET_PERSISTENT_PROPERTY(Slicer3_INCLUDE_DIRS ${tmp} ${SlicerBase_BINARY_DIR})
PROJECT(SlicerBaseGUI)
project(SlicerBaseGUI)
# If we are not in the KWWidgets source tree, make sure we can find KWWidgets
# as an external package, and use it.
FIND_PACKAGE(KWWidgets REQUIRED)
INCLUDE(${KWWidgets_USE_FILE})
find_package(KWWidgets REQUIRED)
include(${KWWidgets_USE_FILE})
# The name of our targets (executable or libraries) will simply be based
# on the project name, with an extra prefix and suffix.
SET(TARGET_BASE_NAME "Slicer3${PROJECT_NAME}Test")
set(TARGET_BASE_NAME "Slicer3${PROJECT_NAME}Test")
# We actually define a class in this example, and we want to be able to
# use its callbacks from our user interface. To do so, we need to create
# a library and wrap it automatically for the Tcl language.
SET(LIB_NAME "SlicerBaseGUI")
SET(LIB_SRCS
set(LIB_NAME "SlicerBaseGUI")
set(LIB_SRCS
vtkSlicerStyle.cxx
vtkSlicerWindow.cxx
vtkSlicerApplicationSettingsInterface.cxx
......@@ -99,70 +98,87 @@ SET(LIB_SRCS
# Helper classes
#SET_SOURCE_FILES_PROPERTIES(
# none yet
# vtkSlicerGUIUpdate.cxx