]> Creatis software - cpPlugins.git/blob - cmake/cpPluginsConfig.cmake.in
...
[cpPlugins.git] / cmake / cpPluginsConfig.cmake.in
1 ## == Some general configuration
2 include(@CMAKE_INSTALL_PREFIX@/lib/cmake/@PROJECT_NAME@/cpPlgDefinitions.cmake)
3 include(@CMAKE_INSTALL_PREFIX@/lib/cmake/@PROJECT_NAME@/cpPlgFunctions.cmake)
4 set(
5   cpPlugins_INSTALL_FILE
6   @CMAKE_INSTALL_PREFIX@/lib/cmake/@PROJECT_NAME@/cpPlgInstallCommands.cmake
7   )
8 ## == Automatically generated commands
9 @PACKAGE_INIT@
10
11 ## == Include targets file
12 set(_targets "${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake")
13 if(EXISTS "${_targets}")
14   include("${_targets}")
15   check_required_components("@PROJECT_NAME@")
16 endif(EXISTS "${_targets}")
17
18 ## ======================================
19 ## == Needed packages and dependencies ==
20 ## ======================================
21
22 ## == Find ITK
23 set(ITK_DIR @ITK_DIR@)
24 find_package(ITK CONFIG REQUIRED)
25 include(${ITK_USE_FILE})
26
27 ## == Find VTK, only if linked against ITK
28 set(cpPlugins_USE_VTK 0)
29 if(ITKVtkGlue_LOADED)
30   find_package(VTK CONFIG REQUIRED)
31   include(${VTK_USE_FILE})
32   set(cpPlugins_USE_VTK 1)
33 endif(ITKVtkGlue_LOADED)
34
35 ## == Find Qt5, only if linked against VTK
36 set(cpPlugins_USE_Qt5 0)
37 if(VTK_FOUND)
38   if(Qt5_DIR)
39     find_package(Qt5 CONFIG REQUIRED COMPONENTS Widgets)
40     set(CMAKE_INCLUDE_CURRENT_DIR ON)
41     set(CMAKE_AUTOMOC ON)
42     set(cpPlugins_USE_Qt5 1)
43   endif(Qt5_DIR)
44 endif(VTK_FOUND)
45
46 ## eof - $RCSfile$