X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=CMakeLists.txt;h=99c90f499abfd253228b7950fbf9f40a1f7cce92;hb=HEAD;hp=ad24e393a265276eb1560cc3d790ea8e79132754;hpb=47b6ec1790c1c9cb9c8396168e73f1c9f3c764bc;p=cpPlugins.git diff --git a/CMakeLists.txt b/CMakeLists.txt index ad24e39..99c90f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,57 +1,41 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.0) - -## ======================== -## == Project definition == -## ======================== - -SET(prj_NAME cpPlugins) -SET(prj_MAJOR_VERSION 0) -SET(prj_MINOR_VERSION 1) -SET(prj_RELEASE_VERSION 0) - -## ========================== -## == Some useful policies == -## ========================== - -SET(_policies CMP0015 CMP0020 CMP0042) -FOREACH(_p ${_policies}) - IF(POLICY ${_p}) - CMAKE_POLICY(SET ${_p} NEW) - ENDIF(POLICY ${_p}) -ENDFOREACH(_p) - -## =========================== -## == Project configuration == -## =========================== - -PROJECT(${prj_NAME}) -SET( - prj_VERSION - "${prj_MAJOR_VERSION}.${prj_MINOR_VERSION}.${prj_RELEASE_VERSION}" - ) -SET(prj_SHORT_VERSION "${prj_MAJOR_VERSION}") - -## ===================================== -## == Functions, packages and options == -## ===================================== - -INCLUDE(cmake/Restrictions.cmake) -INCLUDE(cmake/Options.cmake) -INCLUDE(cmake/KitwareTools.cmake) -OPTION(USE_QT4 "Build Qt4-based code" OFF) -IF(USE_QT4) - INCLUDE(cmake/QtTools.cmake) - SET( - cpPlugins_Qt4_VTKWidget QVTKWidget - CACHE STRING "Base Qt4-based vtkRenderWindow" - ) -ENDIF(USE_QT4) -INCLUDE(cmake/Functions.cmake) - -## =========================== -## == Build different parts == -## =========================== - -SUBDIRS(appli cmake lib plugins) +## ========================================================================= +## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +## ========================================================================= + +## == Base project configuration +cmake_minimum_required(VERSION 3.0) +set(prj_NAME cpPlugins) +set(prj_MAJ 1) +set(prj_MIN 0) +set(prj_REL 0) + +## == Project definiton +project(${prj_NAME} VERSION "${prj_MAJ}.${prj_MIN}.${prj_REL}") +include(cmake/cpPlgDefinitions.cmake) +include(cmake/cpPlgFunctions.cmake) + +## == User could want only cmake scripts +option(cpPlugins_BUILD "Build targets?" OFF) +if(cpPlugins_BUILD) + + ## == Options + option(BUILD_PLUGINS_cpPluginsBase "Build base plugins?" OFF) + + ## == Find Boost + find_package(Boost REQUIRED COMPONENTS filesystem program_options) + + ## == Find Qt5 + find_package(Qt5 CONFIG REQUIRED COMPONENTS Widgets) + set(CMAKE_INCLUDE_CURRENT_DIR ON) + set(CMAKE_AUTOMOC ON) + + ## == Process subdirs + subdirs(appli lib) + +endif(cpPlugins_BUILD) +include(cmake/cpPlgInstallCommands.cmake) + +## == Prepare CMake scripts +subdirs(cmake) ## eof - $RCSfile$