]> Creatis software - FrontAlgorithms.git/blobdiff - CMakeLists.txt
...
[FrontAlgorithms.git] / CMakeLists.txt
index 667002b8fa406ef26186f952e5845a6d9ece29c2..f0fe19b1a9e849fcdfa333382f65de3c6f954398 100644 (file)
@@ -1,63 +1,47 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
-
-## ========================
-## == Project definition ==
-## ========================
-
-SET(prj_NAME FrontAlgorithms)
-SET(prj_MAJOR_VERSION   0)
-SET(prj_MINOR_VERSION   1)
-SET(prj_RELEASE_VERSION 0)
-SET(_subdirs lib plugins)
-SET(_policies CMP0015 CMP0020 CMP0042)
-
-## ==========================
-## == Some useful policies ==
-## ==========================
-
-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 ==
-## =====================================
-
-FIND_PACKAGE(cpPlugins QUIET)
-IF(cpPlugins_DIR)
-  OPTION(USE_cpPlugins "Build cpPlugins-based code" ON)
-ELSE(cpPlugins_DIR)
-  OPTION(USE_cpPlugins "Build cpPlugins-based code" OFF)
-  MARK_AS_ADVANCED(FORCE cpPlugins_DIR)
-ENDIF(cpPlugins_DIR)
-IF(USE_cpPlugins)
-  FIND_PACKAGE(cpPlugins)
-  MARK_AS_ADVANCED(CLEAR cpPlugins_DIR)
-ENDIF(USE_cpPlugins)
-INCLUDE(cmake/BaseConfig.cmake)
-INCLUDE(cmake/KitwareTools.cmake)
-INCLUDE(cmake/QtTools.cmake)
-INCLUDE(cmake/Functions.cmake)
-
-## ===========================
-## == Build different parts ==
-## ===========================
-
-FOREACH(_s ${_subdirs})
-  SUBDIRS(${_s})
-ENDFOREACH(_s)
+## =========================================================================
+## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
+## =========================================================================
+
+cmake_minimum_required(VERSION 3.0)
+
+## == Basic project configuration
+set(prj_NAME fpa)
+set(prj_MAJ 1)
+set(prj_MIN 0)
+set(prj_REL 0)
+
+## == Project definition
+project(${prj_NAME} VERSION "${prj_MAJ}.${prj_MIN}.${prj_REL}")
+
+## == Project policies
+set(_new_policies CMP0015 CMP0020 CMP0042 CMP0053)
+set(_old_policies CMP0006)
+foreach(_p ${_new_policies})
+  if(POLICY ${_p})
+    cmake_policy(SET ${_p} NEW)
+  endif(POLICY ${_p})
+endforeach(_p)
+foreach(_p ${_old_policies})
+  if(POLICY ${_p})
+    cmake_policy(SET ${_p} OLD)
+  endif(POLICY ${_p})
+endforeach(_p)
+
+## == Find cpPlugins
+find_package(cpPlugins CONFIG REQUIRED)
+
+## == Find eigen3 (http://eigen.tuxfamily.org)
+find_package(Eigen3 QUIET CONFIG)
+if(Eigen3_FOUND)
+  include(${EIGEN3_USE_FILE})
+endif(Eigen3_FOUND)
+
+## == Build packages
+set(fpa_BUILD 1)
+subdirs(lib examples appli)
+
+## == Installation commands
+include(${cpPlugins_INSTALL_FILE})
 
 ## eof - $RCSfile$
+