]> 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 find_package(ITK CONFIG REQUIRED)
24 include(${ITK_USE_FILE})
25
26 ## == Find VTK, only if linked against ITK
27 set(cpPlugins_USE_VTK 0)
28 if(ITKVtkGlue_LOADED)
29   find_package(VTK CONFIG REQUIRED)
30   include(${VTK_USE_FILE})
31   set(cpPlugins_USE_VTK 1)
32 endif(ITKVtkGlue_LOADED)
33
34 ## == Find Qt5, only if linked against VTK
35 set(cpPlugins_USE_Qt5 0)
36 if(VTK_FOUND)
37   if(Qt5_DIR)
38     find_package(Qt5 CONFIG REQUIRED COMPONENTS Widgets)
39     set(CMAKE_INCLUDE_CURRENT_DIR ON)
40     set(CMAKE_AUTOMOC ON)
41     set(cpPlugins_USE_Qt5 1)
42   endif(Qt5_DIR)
43 endif(VTK_FOUND)
44
45 ## eof - $RCSfile$