-# ===================================
-# -- Some configurations variables --
-# ===================================
-
-SET(USE_QT4 "@QT4_FOUND@")
-
-# =======================
-# -- Find dependencies --
-# =======================
-
-# Find ITK and VTK
-SET(ITK_DIR @ITK_DIR@)
-FIND_PACKAGE(ITK REQUIRED)
-INCLUDE(${ITK_USE_FILE})
-
-SET(VTK_DIR @VTK_DIR@)
-FIND_PACKAGE(VTK REQUIRED)
-INCLUDE(${VTK_USE_FILE})
-
-# Do not use itk-vtk glue --> problems ahead!!!
-IF(ITKVtkGlue_LOADED)
- MESSAGE(FATAL_ERROR "ITKVtkGlue module is available. Please re-compile your ITK without it. It could lead to nasty compilation problems... Just waiting for Kitware to solve it.")
-ENDIF(ITKVtkGlue_LOADED)
-
-IF(USE_QT4 EQUAL "1")
- SET(QT_QMAKE_EXECUTABLE @QT_QMAKE_EXECUTABLE@)
- FIND_PACKAGE(Qt4 REQUIRED)
- INCLUDE(${QT_USE_FILE})
-
- ## Check for required vtk-qt4 modules
- SET(
- vtk_required_modules
- vtkGUISupportQt
- vtkGUISupportQtOpenGL
- )
- FOREACH(vtk_module ${vtk_required_modules})
- IF(NOT ${vtk_module}_LOADED)
- MESSAGE(
- FATAL_ERROR
- "${vtk_module} module is required but not available."
- )
- ENDIF(NOT ${vtk_module}_LOADED)
- ENDFOREACH(vtk_module)
-ENDIF(USE_QT4 EQUAL "1")
-
-
-# =========================
-# -- Include directories --
-# =========================
-
+## ================================
+## == Find cpPlugins-cmake tools ==
+## ================================
+
+IF("@Qt4_FOUND@" STREQUAL "TRUE")
+ SET(USE_QT4 ON)
+ENDIF("@Qt4_FOUND@" STREQUAL "TRUE")
+
+## ====================
+## == Find libraries ==
+## ====================
+SET(
+ _all_libs
+ "@cpPlugins_tinyxml2_LIB@"
+ "@cpPlugins_QCustomPlot_LIB@"
+ "@cpExtensions_LIB@"
+ "@cpPlugins_LIB@"
+ "@cpBaseQtApplication_LIB@"
+ "@cpPlugins_Instances@"
+ )
+SET(cpPlugins_Instances "@cpPlugins_Instances@")
+
+SET(_l_locations)
+FOREACH(_l ${_all_libs})
+ IF(MSVC)
+ FIND_LIBRARY(
+ ${_l}_LIB NAMES ${_l}
+ HINTS
+ @PROJECT_BINARY_DIR@/$(ConfigurationName)
+ @CMAKE_INSTALL_PREFIX@/bin
+ @CMAKE_INSTALL_PREFIX@/lib
+ )
+ ELSE(MSVC)
+ FIND_LIBRARY(
+ ${_l}_LIB NAMES ${_l}
+ HINTS
+ @PROJECT_BINARY_DIR@
+ @CMAKE_INSTALL_PREFIX@/bin
+ @CMAKE_INSTALL_PREFIX@/lib
+ )
+ ENDIF(MSVC)
+ IF(${_l}_LIB)
+ MARK_AS_ADVANCED(FORCE ${_l}_LIB)
+ GET_FILENAME_COMPONENT(_dir ${${_l}_LIB} DIRECTORY)
+ LIST(APPEND _l_locations ${_dir})
+ ENDIF(${_l}_LIB)
+ENDFOREACH(_l)
+IF(_l_locations)
+ LIST(REMOVE_DUPLICATES _l_locations)
+ LINK_DIRECTORIES(${_l_locations})
+ENDIF(_l_locations)
+
+## ============================
+## == Find bash applications ==
+## ============================
+
+SET(
+ _exec_programs
+ "@cpPlugins_bash_BuildInstances_APP@"
+ "@cpPlugins_bash_HostCreator_APP@"
+ )
+FOREACH(_prog ${_exec_programs})
+ IF(MSVC)
+ FIND_PROGRAM(
+ ${_prog}_APP
+ NAMES ${_prog}
+ HINTS /usr /usr/local
+ PATHS @CMAKE_INSTALL_PREFIX@/bin @PROJECT_BINARY_DIR@/$(ConfigurationName)
+ PATH_SUFFIXES bin sbin
+ DOC "Where is ${_prog}?"
+ )
+ ELSE(MSVC)
+ FIND_PROGRAM(
+ ${_prog}_APP
+ NAMES ${_prog}
+ HINTS /usr /usr/local
+ PATHS @CMAKE_INSTALL_PREFIX@/bin @PROJECT_BINARY_DIR@
+ PATH_SUFFIXES bin sbin
+ DOC "Where is ${_prog}?"
+ )
+ ENDIF(MSVC)
+ MARK_AS_ADVANCED(FORCE ${_prog}_APP)
+ENDFOREACH(_prog)
+
+## =========================
+## == Include directories ==
+## =========================
+
+## TODO: this is not completely correct!!!
INCLUDE_DIRECTORIES(
+ @CMAKE_INSTALL_PREFIX@/include
+ @CMAKE_INSTALL_PREFIX@/include/cpPlugins/Itk2Vtk
+ @CMAKE_INSTALL_PREFIX@/include/cpPlugins/Instances
+ @PROJECT_SOURCE_DIR@
+ @PROJECT_BINARY_DIR@
@PROJECT_SOURCE_DIR@/lib
- @PROJECT_SOURCE_DIR@/lib/third_party
- @PROJECT_SOURCE_DIR@/lib/third_party/ItkVtkGlue
@PROJECT_BINARY_DIR@/lib
- @PROJECT_BINARY_DIR@/lib/third_party
- @PROJECT_BINARY_DIR@/lib/third_party/ItkVtkGlue
- @CMAKE_INSTALL_PREFIX@/include
- @CMAKE_INSTALL_PREFIX@/include/third_party
- @CMAKE_INSTALL_PREFIX@/include/third_party/ItkVtkGlue
+ @PROJECT_SOURCE_DIR@/lib/Itk2Vtk
+ @PROJECT_BINARY_DIR@/lib/Itk2Vtk
+ @PROJECT_SOURCE_DIR@/lib/Instances
+ @PROJECT_BINARY_DIR@/lib/Instances
)
-# =========================
-# -- Library directories --
-# =========================
-
-IF(MSVC)
- LINK_DIRECTORIES(
- @PROJECT_BINARY_DIR@/$(ConfigurationName)
- @CMAKE_INSTALL_PREFIX@/bin
- @CMAKE_INSTALL_PREFIX@/lib
- )
-ELSE(MSVC)
- LINK_DIRECTORIES(
- @PROJECT_BINARY_DIR@
- @CMAKE_INSTALL_PREFIX@/bin
- @CMAKE_INSTALL_PREFIX@/lib
- )
-ENDIF(MSVC)
-
-# ===================
-# -- Library names --
-# ===================
-
-SET(cpExtensions_LIBRARY cpExtensions)
-SET(cpPlugins_Interface_LIBRARY cpPlugins_Interface)
-SET(cpPlugins_LIBRARY cpPlugins)
-
-# ======================
-# -- Executable names --
-# ======================
-
-FIND_PROGRAM(
- cpPlugins_createHost_APP
- NAMES cpPlugins_createHost
- HINTS /usr /usr/local
- PATHS @CMAKE_INSTALL_PREFIX@/bin @PROJECT_BINARY_DIR@
- PATH_SUFFIXES bin sbin
- DOC "Where is cpPlugins_createHost?"
- )
+## ==========================
+## == Configuration values ==
+## ==========================
+
+SET(cpPlugins_NUMBER_OF_FILES @cpPlugins_NUMBER_OF_FILES@ CACHE STRING "Internal")
+SET(cpPlugins_INTEGER_TYPES @cpPlugins_INTEGER_TYPES@ CACHE STRING "Internal")
+SET(cpPlugins_REAL_TYPES @cpPlugins_REAL_TYPES@ CACHE STRING "Internal")
+SET(cpPlugins_PROCESS_DIMENSIONS @cpPlugins_PROCESS_DIMENSIONS@ CACHE STRING "Internal")
+SET(cpPlugins_VISUAL_DIMENSIONS @cpPlugins_VISUAL_DIMENSIONS@ CACHE STRING "Internal")
+
+MARK_AS_ADVANCED(FORCE cpPlugins_NUMBER_OF_FILES)
+MARK_AS_ADVANCED(FORCE cpPlugins_INTEGER_TYPES)
+MARK_AS_ADVANCED(FORCE cpPlugins_REAL_TYPES)
+MARK_AS_ADVANCED(FORCE cpPlugins_PROCESS_DIMENSIONS)
+MARK_AS_ADVANCED(FORCE cpPlugins_VISUAL_DIMENSIONS)
## eof - $RCSfile$