]> Creatis software - cpPlugins.git/blobdiff - CMakeLists.txt
Moved to version 1.0
[cpPlugins.git] / CMakeLists.txt
index 726395909b36eef4c1799e6ca96eb4f40d44f2ea..99c90f499abfd253228b7950fbf9f40a1f7cce92 100644 (file)
@@ -1,51 +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)
-SUBDIRS(appli 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$