X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=CMakeLists.txt;h=4f4f23286e744c982dd049ab5f1e531f46067dc7;hb=ae0e1b8916a0fb2188080b9134c1c2781c6c200f;hp=355805097c79c24f5911520158f094d18ee16377;hpb=203ea510f7cc3990e606dd93a97dd0b5075d35c4;p=FrontAlgorithms.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 3558050..4f4f232 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,68 +1,41 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.0) +## ========================================================================= +## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +## ========================================================================= -## ======================== -## == Project definition == -## ======================== +cmake_minimum_required(VERSION 3.0) -SET(prj_NAME FrontAlgorithms) -SET(prj_MAJOR_VERSION 0) -SET(prj_MINOR_VERSION 1) -SET(prj_RELEASE_VERSION 0) +## == Basic project configuration +set(prj_NAME fpa) +set(prj_MAJ 1) +set(prj_MIN 0) +set(prj_REL 0) -## ========================== -## == Some useful policies == -## ========================== +## == Project definition +project(${prj_NAME} VERSION "${prj_MAJ}.${prj_MIN}.${prj_REL}") -SET(_policies CMP0015 CMP0020 CMP0042) -FOREACH(_p ${_policies}) - IF(POLICY ${_p}) - CMAKE_POLICY(SET ${_p} NEW) - ENDIF(POLICY ${_p}) -ENDFOREACH(_p) +## == Project policies +set(_policies CMP0015 CMP0020 CMP0042 CMP0053) +foreach(_p ${_policies}) + if(POLICY ${_p}) + cmake_policy(SET ${_p} NEW) + endif(POLICY ${_p}) +endforeach(_p) -## =========================== -## == Project configuration == -## =========================== +## == Find cpPlugins +find_package(cpPlugins CONFIG REQUIRED) -PROJECT(${prj_NAME}) -SET( - prj_VERSION - "${prj_MAJOR_VERSION}.${prj_MINOR_VERSION}.${prj_RELEASE_VERSION}" - ) -SET(prj_SHORT_VERSION "${prj_MAJOR_VERSION}") +## == Find eigen3 (http://eigen.tuxfamily.org) +find_package(Eigen3 QUIET CONFIG) +if(Eigen3_FOUND) + include(${EIGEN3_USE_FILE}) +endif(Eigen3_FOUND) -## ===================================== -## == Functions, packages and options == -## ===================================== +## == Build packages +set(fpa_BUILD 1) +subdirs(lib examples appli) -INCLUDE(cmake/Restrictions.cmake) -INCLUDE(cmake/Functions.cmake) -INCLUDE(cmake/KitwareTools.cmake) -INCLUDE(cmake/Options.cmake) - -## =========================== -## == Use all valid subdirs == -## =========================== - -SET( - _include_dirs - . - lib - ) -IF(USE_cpPlugins) - LIST(APPEND _include_dirs lib/Instances) -ENDIF(USE_cpPlugins) -FOREACH(_dir ${_include_dirs}) - INCLUDE_DIRECTORIES( - ${PROJECT_SOURCE_DIR}/${_dir} - ${PROJECT_BINARY_DIR}/${_dir} - ) -ENDFOREACH(_dir) - -## ======================== -## == Manage source code == -## ======================== - -SUBDIRS(cmake lib plugins appli) +## == Installation commands +include(${cpPlugins_INSTALL_FILE}) ## eof - $RCSfile$ +