-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
-INCLUDE(cmake/cpPlugins_Policies.cmake)
-INCLUDE(cmake/cpPlugins_Functions.cmake)
+CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
-## ==================
-## == Project name ==
-## ==================
+## ========================
+## == Project definition ==
+## ========================
-PROJECT(cpPlugins)
-SET(prj_MAJ_VER "0")
-SET(prj_MIN_VER "1")
-SET(prj_REL_VER "0")
-SET(prj_VERSION "${prj_MAJ_VER}.${prj_MIN_VER}.${prj_REL_VER}")
-SET(prj_SHORT_VERSION "${prj_MAJ_VER}")
+SET(prj_NAME cpPlugins)
+SET(prj_MAJ_VERSION 0)
+SET(prj_MIN_VERSION 1)
+SET(prj_REL_VERSION 0)
+SET(_subdirs cmake bash lib tools plugins appli)
+SET(_policies CMP0015 CMP0020 CMP0042)
## ==========================
-## == Packages and options ==
+## == Some useful policies ==
## ==========================
-INCLUDE(cmake/cpPlugins_Options.cmake)
-INCLUDE(cmake/cpPlugins_KitwareTools.cmake)
-
-## =====================
-## == Qt4 is optional ==
-## =====================
-
-OPTION(USE_QT4 "Build Qt4-based code" OFF)
-INCLUDE(cmake/cpPlugins_Qt4Tools.cmake)
-
-## =========================
-## == Include directories ==
-## =========================
-
-SET(
- cpPlugins_RELATIVE_INCLUDE_DIRS
- .
- lib
- lib/Itk2Vtk
- lib/Instances
- )
-SET(cpPlugins_INCLUDE_DIRS)
-FOREACH(_d ${cpPlugins_RELATIVE_INCLUDE_DIRS})
- LIST(APPEND cpPlugins_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/${_d})
- LIST(APPEND cpPlugins_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/${_d})
-ENDFOREACH(_d)
-INCLUDE_DIRECTORIES(${cpPlugins_INCLUDE_DIRS})
-
-## =============================
-## == Subdirs containing code ==
-## =============================
-
-SUBDIRS(appli cmake lib plugins)
+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_MAJ_VERSION}.${prj_MIN_VERSION}.${prj_REL_VERSION}")
+SET(prj_SHORT_VERSION "${prj_MAJ_VERSION}")
+
+## =====================================
+## == Functions, packages and options ==
+## =====================================
+
+INCLUDE(cmake/BaseConfig.cmake)
+INCLUDE(cmake/Options.cmake)
+INCLUDE(cmake/KitwareTools.cmake)
+INCLUDE(cmake/QtTools.cmake)
+INCLUDE(cmake/Functions.cmake)
+
+## ===========================
+## == Build different parts ==
+## ===========================
+
+FOREACH(_s ${_subdirs})
+ SUBDIRS(${_s})
+ENDFOREACH(_s)
## eof - $RCSfile$