X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=cmake%2FcpPluginsConfig.cmake.in;h=340489d28c2d91ed9ad0182dd20e571c6403606f;hb=8f73fe60149066b59be7cc39e352f74a1e9e664f;hp=8c2e0a86998995b665759ff65f8536f323725d1e;hpb=b07ef139fe5264b87e1f95dc43671ef5705eb3f7;p=cpPlugins.git diff --git a/cmake/cpPluginsConfig.cmake.in b/cmake/cpPluginsConfig.cmake.in index 8c2e0a8..340489d 100644 --- a/cmake/cpPluginsConfig.cmake.in +++ b/cmake/cpPluginsConfig.cmake.in @@ -2,7 +2,47 @@ # -- Some configurations variables -- # =================================== -SET(cpPlugins_with_QT4 "@QT4_FOUND@") +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 -- @@ -44,15 +84,31 @@ ENDIF(MSVC) SET(cpExtensions_LIBRARY cpExtensions) SET(cpPlugins_Interface_LIBRARY cpPlugins_Interface) +SET(cpPlugins_Pluma_LIBRARY cpPlugins_Pluma) SET(cpPlugins_LIBRARY cpPlugins) # ====================== # -- Executable names -- # ====================== -SET( - cpPlugins_createHost_APP - @PROJECT_BINARY_DIR@/cpPlugins_createHost - ) +IF(MSVC) + FIND_PROGRAM( + cpPlugins_createHost_APP + NAMES cpPlugins_createHost + HINTS /usr /usr/local + PATHS @CMAKE_INSTALL_PREFIX@/bin @PROJECT_BINARY_DIR@/Debug @PROJECT_BINARY_DIR@/Release @PROJECT_BINARY_DIR@/MinSizeRel @PROJECT_BINARY_DIR@/RelWithDebInfo + PATH_SUFFIXES bin sbin + DOC "Where is cpPlugins_createHost?" + ) +ELSE(MSVC) + 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?" + ) +ENDIF(MSVC) ## eof - $RCSfile$