]> Creatis software - cpPlugins.git/blob - CMakeLists.txt
cc162d4300d31c5ebc074e9ebafc90bb417a7a22
[cpPlugins.git] / CMakeLists.txt
1 ## =========================================================================
2 ## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 ## =========================================================================
4
5 cmake_minimum_required(VERSION 3.0)
6
7 ## == Basic project configuration
8 set(prj_NAME cpPlugins)
9 set(prj_MAJ 1)
10 set(prj_MIN 0)
11 set(prj_REL 0)
12
13 ## == Project definition
14 project(${prj_NAME} VERSION "${prj_MAJ}.${prj_MIN}.${prj_REL}")
15
16 ## == Project policies
17 set(_policies CMP0015 CMP0020 CMP0042 CMP0053)
18 foreach(_p ${_policies})
19   if(POLICY ${_p})
20     cmake_policy(SET ${_p} NEW)
21   endif(POLICY ${_p})
22 endforeach(_p)
23
24 ## == Some general configuration
25 include(cmake/Definitions.cmake)
26 include(cmake/Functions.cmake)
27
28 ## == Find ITK
29 find_package(ITK CONFIG REQUIRED)
30 include(${ITK_USE_FILE})
31
32 ## == Find VTK, only if linked against ITK
33 set(cpPlugins_USE_VTK 0)
34 if(ITKVtkGlue_LOADED)
35   find_package(VTK CONFIG REQUIRED)
36   include(${VTK_USE_FILE})
37   set(cpPlugins_USE_VTK 1)
38 endif(ITKVtkGlue_LOADED)
39
40 ## == Find Qt5, only if linked against VTK
41 set(cpPlugins_USE_Qt5 0)
42 if(VTK_FOUND)
43   if(Qt5_DIR)
44     find_package(Qt5 CONFIG REQUIRED COMPONENTS Widgets)
45     set(CMAKE_INCLUDE_CURRENT_DIR ON)
46     set(CMAKE_AUTOMOC ON)
47     set(cpPlugins_USE_Qt5 1)
48   endif(Qt5_DIR)
49 endif(VTK_FOUND)
50
51 ## == Build packages
52 subdirs(lib)
53
54 ## == Installation commands
55 ## include(cmake/InstallCommands.cmake)
56
57 ## eof - $RCSfile$