]> 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
5 ## == Automatically generated commands
6 @PACKAGE_INIT@
7
8 include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake")
9 check_required_components("@PROJECT_NAME@")
10
11 ## ======================================
12 ## == Needed packages and dependencies ==
13 ## ======================================
14
15 ## == Find ITK
16 find_package(ITK CONFIG REQUIRED)
17 include(${ITK_USE_FILE})
18
19 ## == Find VTK, only if linked against ITK
20 set(cpPlugins_USE_VTK 0)
21 if(ITKVtkGlue_LOADED)
22   find_package(VTK CONFIG REQUIRED)
23   include(${VTK_USE_FILE})
24   set(cpPlugins_USE_VTK 1)
25 endif(ITKVtkGlue_LOADED)
26
27 ## == Find Qt5, only if linked against VTK
28 set(cpPlugins_USE_Qt5 0)
29 if(VTK_FOUND)
30   if(Qt5_DIR)
31     find_package(Qt5 CONFIG REQUIRED COMPONENTS Widgets)
32     set(CMAKE_INCLUDE_CURRENT_DIR ON)
33     set(CMAKE_AUTOMOC ON)
34     set(cpPlugins_USE_Qt5 1)
35   endif(Qt5_DIR)
36 endif(VTK_FOUND)
37
38 ## eof - $RCSfile$