CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+INCLUDE(cmake/fpa_Policies.cmake)
-## ============
-## = Policies =
-## ============
-
-SET(
- policies
- CMP0015
- CMP0020
- CMP0042
- )
-FOREACH(policy ${policies})
- IF(POLICY ${policy})
- CMAKE_POLICY(SET ${policy} NEW)
- ENDIF(POLICY ${policy})
-ENDFOREACH(policy)
-
-## ================
-## = Project name =
-## ================
+## ==================
+## == Project name ==
+## ==================
PROJECT(FrontAlgorithms)
SET(prj_MAJ_VER "0")
-SET(prj_MIN_VER "0")
-SET(prj_REL_VER "1")
+SET(prj_MIN_VER "1")
+SET(prj_REL_VER "0")
SET(prj_VER "${prj_MAJ_VER}.${prj_MIN_VER}.${prj_REL_VER}")
SET(prj_sVER "${prj_MAJ_VER}")
-## ===========
-## = Options =
-## ===========
-
-## OPTION(BUILD_EXAMPLES "Build examples" OFF)
-OPTION(BUILD_PLUGINS "Build plugins" OFF)
-
-## ============
-## = Packages =
-## ============
+## =====================
+## == Main dependency ==
+## =====================
-# NOTE: It seems that by default on Visual Studio Compiler supports c++11,
-# so it only need to be test on other O.S.
-IF(NOT MSVC)
- INCLUDE(CheckCXXCompilerFlag)
- CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
- CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
- IF(COMPILER_SUPPORTS_CXX11)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
- ELSEIF(COMPILER_SUPPORTS_CXX0X)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
- ELSE()
- MESSAGE(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
- ENDIF()
-ENDIF(NOT MSVC)
-
-# Prepare header to build shared libs (windows)
-INCLUDE(GenerateExportHeader)
-
-# Find cpPlugins
FIND_PACKAGE(cpPlugins REQUIRED)
-## ================================================
-## = Do not allow to build inside the source tree =
-## ================================================
-
-IF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR})
- MESSAGE(FATAL_ERROR "Building in the source tree is not allowed")
-ENDIF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR})
+## =============
+## == Options ==
+## =============
-## =====================================
-## = Where to put executables and libs =
-## =====================================
-
-SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
-SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
-MARK_AS_ADVANCED(
- CMAKE_BACKWARDS_COMPATIBILITY
- EXECUTABLE_OUTPUT_PATH
- LIBRARY_OUTPUT_PATH
- )
+OPTION(BUILD_PLUGINS "Build plugins" ON)
-## ==============================
-## = Subdirs containing headers =
-## ==============================
+## =========================
+## == Include directories ==
+## =========================
INCLUDE_DIRECTORIES(
${PROJECT_SOURCE_DIR}
${PROJECT_BINARY_DIR}/plugins
)
-## ===========================
-## = Subdirs containing code =
-## ===========================
+## =============================
+## == Subdirs containing code ==
+## =============================
SUBDIRS(
cmake
lib
- appli
+ plugins
+ # appli
)
-IF(BUILD_PLUGINS)
- SUBDIRS(
- plugins
- )
-ENDIF(BUILD_PLUGINS)
## eof - $RCSfile$