]> Creatis software - cpPlugins.git/blob - cmake/cpPlg3rdParty.cmake
Moved to version 1.0
[cpPlugins.git] / cmake / cpPlg3rdParty.cmake
1 ## =========================================================================
2 ## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 ## =========================================================================
4
5 ## == Find Boost
6 find_package(Boost REQUIRED COMPONENTS filesystem program_options)
7
8 ## == Find ITK
9 find_package(ITK CONFIG REQUIRED)
10 include(${ITK_USE_FILE})
11
12 ## == Find VTK, only if linked against ITK
13 set(cpPlugins_USE_VTK 0)
14 if(ITKVtkGlue_LOADED)
15   find_package(VTK CONFIG REQUIRED)
16   include(${VTK_USE_FILE})
17   set(cpPlugins_USE_VTK 1)
18 endif(ITKVtkGlue_LOADED)
19
20 ## == Find Qt5, only if linked against VTK
21 set(cpPlugins_USE_Qt5 0)
22 if(VTK_FOUND)
23   if(Qt5_DIR)
24     find_package(Qt5 CONFIG REQUIRED COMPONENTS Widgets)
25     set(CMAKE_INCLUDE_CURRENT_DIR ON)
26     set(CMAKE_AUTOMOC ON)
27     set(cpPlugins_USE_Qt5 1)
28   endif(Qt5_DIR)
29 endif(VTK_FOUND)
30
31 ## eof - $RCSfile$