1-
2-
31# --------------------------------------------------------------------------
42# Try to find VTK and include its settings (otherwise complain)
53FIND_PACKAGE (VTK NO_MODULE REQUIRED PATHS ${VTK_DIR} NO_DEFAULT_PATH )
@@ -16,13 +14,11 @@ FIND_PACKAGE (ITK REQUIRED PATHS ${ITK_DIR} NO_DEFAULT_PATH)
1614IF ( ITK_FOUND )
1715 INCLUDE ( ${ITK_USE_FILE} )
1816ELSE ( ITK_FOUND )
19- MESSAGE ( FATAL_ERROR "This application requires ITK. One of these components is missing. Please verify configuration" )
17+ MESSAGE ( FATAL_ERROR "This application requires ITK. One of these components is missing. Please verify configuration" )
2018ENDIF ( ITK_FOUND )
2119
22-
2320# --------------------------------------------------------------------------
2421# Use OpenIGTLink protocol
25- #
2622OPTION (PLUS_USE_OpenIGTLink "Use the OpenIGTLink protocol" OFF )
2723SET (PLUS_OPENIGTLINK_VERSION)
2824IF (PLUS_USE_OpenIGTLink)
@@ -41,13 +37,12 @@ ENDIF(PLUS_USE_OpenIGTLink)
4137# --------------------------------------------------------------------------
4238# Options
4339OPTION (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)
4540
4641# --------------------------------------------------------------------------
4742# Use accurate or simple timer protocol
4843#
4944# DevPartnerStudio performance profiler hangs if the accurate timer
50- # is used.If USE_SIMPLE_TIMER is defined then the accurate timer is
45+ # is used. If USE_SIMPLE_TIMER is defined then the accurate timer is
5146# bypassed. It should only be enabled for performance profiling.
5247
5348OPTION (PLUS_USE_SIMPLE_TIMER "Use simple timer (not very accurate but more compatible with performance profilers)" OFF )
@@ -60,7 +55,6 @@ OPTION(PLUS_USE_INTEL_MKL "Use the Intel MKL library (only for image processing)
6055
6156# --------------------------------------------------------------------------
6257# Configure output paths for libraries and executables.
63- #
6458IF (NOT DEFINED PLUS_EXECUTABLE_OUTPUT_PATH)
6559 SET (PLUS_EXECUTABLE_OUTPUT_PATH "${PlusLib_BINARY_DIR} /bin" )
6660ENDIF ()
@@ -77,7 +71,6 @@ ENDIF()
7771
7872# --------------------------------------------------------------------------
7973# Sikuli binary directory path.
80- #
8174SET (SIKULI_BIN_DIR ${PLUSLIB_TOOLS_DIR} /Sikuli/ CACHE PATH "Path to the Sikuli binary directory." FORCE )
8275
8376# --------------------------------------------------------------------------
@@ -91,7 +84,6 @@ LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH})
9184
9285# --------------------------------------------------------------------------
9386# Command-line application documentation
94- #
9587
9688# Create directory for the command-line application help files (they are generated by after build by running
9789# each command-line tool with the --help parameter)
@@ -113,7 +105,6 @@ ENDMACRO(GENERATE_HELP_DOC)
113105
114106# --------------------------------------------------------------------------
115107# Library export directive file generation
116- #
117108
118109# This macro generates a ...Export.h file that specifies platform-specific DLL export directives,
119110# for example on Windows: __declspec( dllexport )
@@ -129,7 +120,6 @@ ENDMACRO(GENERATE_EXPORT_DIRECTIVE_FILE)
129120
130121# --------------------------------------------------------------------------
131122# Initialize variables that will be filled by makefiles in subdirectories
132- #
133123
134124# PLUSLIB_DEPENDENCIES contain all the exported targets that will be
135125# available to applications that use PlusLib
@@ -183,7 +173,6 @@ ADD_SUBDIRECTORY(PlusVolumeReconstruction)
183173INCLUDE_DIRECTORIES ( ${PlusVolumeReconstruction_INCLUDE_DIRS} )
184174SET (PLUSLIB_INCLUDE_DIRS ${PLUSLIB_INCLUDE_DIRS} ${PlusVolumeReconstruction_INCLUDE_DIRS} CACHE INTERNAL "" )
185175
186- # PlusDataCollection
187176ADD_SUBDIRECTORY (PlusDataCollection )
188177INCLUDE_DIRECTORIES ( ${PlusDataCollection_INCLUDE_DIRS} )
189178SET (PLUSLIB_INCLUDE_DIRS ${PLUSLIB_INCLUDE_DIRS} ${PlusDataCollection_INCLUDE_DIRS} CACHE INTERNAL "" )
@@ -206,7 +195,6 @@ FILE(GLOB headers
206195
207196# --------------------------------------------------------------------------
208197# Configure include file
209- #
210198CONFIGURE_FILE (
211199 ${CMAKE_CURRENT_SOURCE_DIR} /PlusConfigure.h.in
212200 ${CMAKE_CURRENT_BINARY_DIR} /PlusConfigure.h
@@ -236,6 +224,27 @@ export(TARGETS
236224# (this registers the build-tree with a global CMake-registry)
237225export (PACKAGE PlusLib )
238226
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+
239248#-----------------------------------------------------------------------------
240249# Re: #1075 eventually remove this section after people are used to the new location
241250# Create a PlusConfig.cmake file for the use from the build tree
@@ -253,7 +262,6 @@ CONFIGURE_FILE(PlusLibConfigVersion.cmake.in
253262
254263#-----------------------------------------------------------------------------
255264# Generate default application configuration files in the non-installed executable directories (Release and Debug too)
256- #
257265SET ( PLUSCONFIG_DEVICESET_CONFIG_DIR "${PLUSLIB_DATA_DIR} /ConfigFiles" )
258266SET ( PLUSCONFIG_IMAGE_DIR "${PLUSLIB_DATA_DIR} /TestImages" )
259267SET ( PLUSCONFIG_MODEL_DIR "${PLUSLIB_DATA_DIR} /CADModels" )
@@ -279,7 +287,6 @@ ENDIF()
279287
280288#-----------------------------------------------------------------------------
281289# Documentation
282- #
283290OPTION (BUILD_DOCUMENTATION "Build the documentation (Doxygen)." OFF )
284291MARK_AS_ADVANCED (BUILD_DOCUMENTATION )
285292
@@ -308,32 +315,13 @@ ENDIF(BUILD_DOCUMENTATION)
308315
309316ADD_SUBDIRECTORY (Documentation )
310317
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-
329318#-----------------------------------------------------------------------------
330319# Generate include file for projects that use this library
331- #
332320CONFIGURE_FILE (
333321 ${CMAKE_CURRENT_SOURCE_DIR} /UsePlusLib.cmake.in
334322 ${CMAKE_CURRENT_BINARY_DIR} /UsePlusLib.cmake @ONLY )
335323
336- #-----------------------------------------------------------------------------
324+ #-----------------------------------------------------------------------------
337325# With regards to ticket #1075, also generate in top-level directory
338326CONFIGURE_FILE (
339327 ${CMAKE_CURRENT_SOURCE_DIR} /UsePlusLib.cmake.in
0 commit comments