1 ## =========================================================================
2 ## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 ## =========================================================================
5 cmake_minimum_required(VERSION 3.0)
7 ## == Basic project configuration
8 set(prj_NAME cpPlugins)
13 ## == Project definition
14 project(${prj_NAME} VERSION "${prj_MAJ}.${prj_MIN}.${prj_REL}")
16 ## == Project policies
17 set(_policies CMP0015 CMP0020 CMP0042 CMP0053)
18 foreach(_p ${_policies})
20 cmake_policy(SET ${_p} NEW)
24 ## == Some general configuration
25 include(cmake/cpPlgDefinitions.cmake)
26 include(cmake/cpPlgFunctions.cmake)
28 ## == User could choose not to build
29 option(cpPlugins_BUILD "Build targets." OFF)
33 find_package(ITK CONFIG REQUIRED)
34 include(${ITK_USE_FILE})
36 ## == Find VTK, only if linked against ITK
37 set(cpPlugins_USE_VTK 0)
39 find_package(VTK CONFIG REQUIRED)
40 include(${VTK_USE_FILE})
41 set(cpPlugins_USE_VTK 1)
42 endif(ITKVtkGlue_LOADED)
44 ## == Find Qt5, only if linked against VTK
45 set(cpPlugins_USE_Qt5 0)
48 find_package(Qt5 CONFIG REQUIRED COMPONENTS Widgets)
49 set(CMAKE_INCLUDE_CURRENT_DIR ON)
51 set(cpPlugins_USE_Qt5 1)
58 endif(cpPlugins_BUILD)