X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=CMakeLists.txt;h=99c90f499abfd253228b7950fbf9f40a1f7cce92;hb=HEAD;hp=2e161e434f4b0d3a23e46766c6fa9c864e507b4c;hpb=ced860e96e5d2e10481582649664505396b0054d;p=cpPlugins.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e161e4..99c90f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,50 +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) -INCLUDE(cmake/QtTools.cmake) -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$