1+
2+
13# --------------------------------------------------------------------------
24# Try to find VTK and include its settings (otherwise complain)
35FIND_PACKAGE (VTK NO_MODULE REQUIRED PATHS ${VTK_DIR} NO_DEFAULT_PATH )
@@ -14,11 +16,13 @@ FIND_PACKAGE (ITK REQUIRED PATHS ${ITK_DIR} NO_DEFAULT_PATH)
1416IF ( ITK_FOUND )
1517 INCLUDE ( ${ITK_USE_FILE} )
1618ELSE ( ITK_FOUND )
17- MESSAGE ( FATAL_ERROR "This application requires ITK. One of these components is missing. Please verify configuration" )
19+ MESSAGE ( FATAL_ERROR "This application requires ITK. One of these components is missing. Please verify configuration" )
1820ENDIF ( ITK_FOUND )
1921
22+
2023# --------------------------------------------------------------------------
2124# Use OpenIGTLink protocol
25+ #
2226OPTION (PLUS_USE_OpenIGTLink "Use the OpenIGTLink protocol" OFF )
2327SET (PLUS_OPENIGTLINK_VERSION)
2428IF (PLUS_USE_OpenIGTLink)
@@ -37,12 +41,13 @@ ENDIF(PLUS_USE_OpenIGTLink)
3741# --------------------------------------------------------------------------
3842# Options
3943OPTION (BUILD_SHARED_LIBS "Build with shared libraries." ${VTK_BUILD_SHARED_LIBS} ${ITK_BUILD_SHARED_LIBS} )
44+ # OPTION (BUILD_SLICER_MODULE "Build project as Slicer module" OFF)
4045
4146# --------------------------------------------------------------------------
4247# Use accurate or simple timer protocol
4348#
4449# DevPartnerStudio performance profiler hangs if the accurate timer
45- # is used. If USE_SIMPLE_TIMER is defined then the accurate timer is
50+ # is used.If USE_SIMPLE_TIMER is defined then the accurate timer is
4651# bypassed. It should only be enabled for performance profiling.
4752
4853OPTION (PLUS_USE_SIMPLE_TIMER "Use simple timer (not very accurate but more compatible with performance profilers)" OFF )
@@ -55,6 +60,7 @@ OPTION(PLUS_USE_INTEL_MKL "Use the Intel MKL library (only for image processing)
5560
5661# --------------------------------------------------------------------------
5762# Configure output paths for libraries and executables.
63+ #
5864IF (NOT DEFINED PLUS_EXECUTABLE_OUTPUT_PATH)
5965 SET (PLUS_EXECUTABLE_OUTPUT_PATH "${PlusLib_BINARY_DIR} /bin" )
6066ENDIF ()
@@ -71,6 +77,7 @@ ENDIF()
7177
7278# --------------------------------------------------------------------------
7379# Sikuli binary directory path.
80+ #
7481SET (SIKULI_BIN_DIR ${PLUSLIB_TOOLS_DIR} /Sikuli/ CACHE PATH "Path to the Sikuli binary directory." FORCE )
7582
7683# --------------------------------------------------------------------------
@@ -84,6 +91,7 @@ LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH})
8491
8592# --------------------------------------------------------------------------
8693# Command-line application documentation
94+ #
8795
8896# Create directory for the command-line application help files (they are generated by after build by running
8997# each command-line tool with the --help parameter)
@@ -105,6 +113,7 @@ ENDMACRO(GENERATE_HELP_DOC)
105113
106114# --------------------------------------------------------------------------
107115# Library export directive file generation
116+ #
108117
109118# This macro generates a ...Export.h file that specifies platform-specific DLL export directives,
110119# for example on Windows: __declspec( dllexport )
@@ -120,6 +129,7 @@ ENDMACRO(GENERATE_EXPORT_DIRECTIVE_FILE)
120129
121130# --------------------------------------------------------------------------
122131# Initialize variables that will be filled by makefiles in subdirectories
132+ #
123133
124134# PLUSLIB_DEPENDENCIES contain all the exported targets that will be
125135# available to applications that use PlusLib
@@ -173,6 +183,7 @@ ADD_SUBDIRECTORY(PlusVolumeReconstruction)
173183INCLUDE_DIRECTORIES ( ${PlusVolumeReconstruction_INCLUDE_DIRS} )
174184SET (PLUSLIB_INCLUDE_DIRS ${PLUSLIB_INCLUDE_DIRS} ${PlusVolumeReconstruction_INCLUDE_DIRS} CACHE INTERNAL "" )
175185
186+ # PlusDataCollection
176187ADD_SUBDIRECTORY (PlusDataCollection )
177188INCLUDE_DIRECTORIES ( ${PlusDataCollection_INCLUDE_DIRS} )
178189SET (PLUSLIB_INCLUDE_DIRS ${PLUSLIB_INCLUDE_DIRS} ${PlusDataCollection_INCLUDE_DIRS} CACHE INTERNAL "" )
@@ -195,6 +206,7 @@ FILE(GLOB headers
195206
196207# --------------------------------------------------------------------------
197208# Configure include file
209+ #
198210CONFIGURE_FILE (
199211 ${CMAKE_CURRENT_SOURCE_DIR} /PlusConfigure.h.in
200212 ${CMAKE_CURRENT_BINARY_DIR} /PlusConfigure.h
@@ -224,27 +236,6 @@ export(TARGETS
224236# (this registers the build-tree with a global CMake-registry)
225237export (PACKAGE PlusLib )
226238
227- #----------------------------------------------------------------------------
228- # Append entries for export
229- IF ( ${PLUS_USE_EPIPHAN} )
230- LIST (APPEND PLUSLIB_DEPENDENCIES Epiphan)
231- ENDIF ()
232- IF ( ${PLUS_USE_Ascension3DG} )
233- LIST (APPEND PLUSLIB_DEPENDENCIES Ascension3DG)
234- ENDIF ()
235- IF ( ${PLUS_USE_Ascension3DGm} )
236- LIST (APPEND PLUSLIB_DEPENDENCIES Ascension3DGm)
237- ENDIF ()
238- IF ( ${PLUS_USE_PHIDGET_SPATIAL_TRACKER} )
239- LIST (APPEND PLUSLIB_DEPENDENCIES phidget)
240- ENDIF ()
241- IF ( ${PLUS_USE_BRACHY_TRACKER} )
242- LIST (APPEND PLUSLIB_DEPENDENCIES USDigitalEncoders)
243- ENDIF ()
244- IF ( ${PLUS_USE_NVIDIA_DVP} )
245- LIST (APPEND PLUSLIB_DEPENDENCIES NVidiaDVP)
246- ENDIF ()
247-
248239#-----------------------------------------------------------------------------
249240# Re: #1075 eventually remove this section after people are used to the new location
250241# Create a PlusConfig.cmake file for the use from the build tree
@@ -262,6 +253,7 @@ CONFIGURE_FILE(PlusLibConfigVersion.cmake.in
262253
263254#-----------------------------------------------------------------------------
264255# Generate default application configuration files in the non-installed executable directories (Release and Debug too)
256+ #
265257SET ( PLUSCONFIG_DEVICESET_CONFIG_DIR "${PLUSLIB_DATA_DIR} /ConfigFiles" )
266258SET ( PLUSCONFIG_IMAGE_DIR "${PLUSLIB_DATA_DIR} /TestImages" )
267259SET ( PLUSCONFIG_MODEL_DIR "${PLUSLIB_DATA_DIR} /CADModels" )
@@ -287,6 +279,7 @@ ENDIF()
287279
288280#-----------------------------------------------------------------------------
289281# Documentation
282+ #
290283OPTION (BUILD_DOCUMENTATION "Build the documentation (Doxygen)." OFF )
291284MARK_AS_ADVANCED (BUILD_DOCUMENTATION )
292285
@@ -315,13 +308,32 @@ ENDIF(BUILD_DOCUMENTATION)
315308
316309ADD_SUBDIRECTORY (Documentation )
317310
311+ #----------------------------------------------------------------------------
312+ # Append entries for export to UsePlusLib.cmake
313+ IF ( ${PLUS_USE_EPIPHAN} )
314+ LIST (APPEND PLUSLIB_DEPENDENCIES Epiphan)
315+ ENDIF ()
316+ IF ( ${PLUS_USE_Ascension3DG} )
317+ LIST (APPEND PLUSLIB_DEPENDENCIES Ascension3DG)
318+ ENDIF ()
319+ IF ( ${PLUS_USE_Ascension3DGm} )
320+ LIST (APPEND PLUSLIB_DEPENDENCIES Ascension3DGm)
321+ ENDIF ()
322+ IF ( ${PLUS_USE_PHIDGET_SPATIAL_TRACKER} )
323+ LIST (APPEND PLUSLIB_DEPENDENCIES phidget)
324+ ENDIF ()
325+ IF ( ${PLUS_USE_BRACHY_TRACKER} )
326+ LIST (APPEND PLUSLIB_DEPENDENCIES USDigitalEncoders)
327+ ENDIF ()
328+
318329#-----------------------------------------------------------------------------
319330# Generate include file for projects that use this library
331+ #
320332CONFIGURE_FILE (
321333 ${CMAKE_CURRENT_SOURCE_DIR} /UsePlusLib.cmake.in
322334 ${CMAKE_CURRENT_BINARY_DIR} /UsePlusLib.cmake @ONLY )
323335
324- #-----------------------------------------------------------------------------
336+ #-----------------------------------------------------------------------------
325337# With regards to ticket #1075, also generate in top-level directory
326338CONFIGURE_FILE (
327339 ${CMAKE_CURRENT_SOURCE_DIR} /UsePlusLib.cmake.in
0 commit comments