paradiseo-->peo
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@598 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
ef7821fa60
commit
dd69a368dc
21 changed files with 377 additions and 562 deletions
|
|
@ -3,9 +3,9 @@
|
|||
### 0) Preliminary checking: no WIN and libxml2
|
||||
######################################################################################
|
||||
|
||||
IF(WIN32)
|
||||
MESSAGE (FATAL_ERROR "ParadisEO-PEO can not be generated on Windows systems")
|
||||
ENDIF(WIN32)
|
||||
#IF(WIN32)
|
||||
# MESSAGE (FATAL_ERROR "ParadisEO-PEO can not be generated on Windows systems")
|
||||
#ENDIF(WIN32)
|
||||
|
||||
# check libxml2
|
||||
FIND_PROGRAM(XML2_CONFIG_PROGRAM NAMES xml2-config PATHS /usr/local/bin /usr/bin DOC "The libxml2 (www.xmlsoft.org) configuration tool")
|
||||
|
|
@ -24,7 +24,7 @@ EXECUTE_PROCESS(COMMAND ${XML2_CONFIG_PROGRAM} --libs OUTPUT_VARIABLE XML2_LIBS
|
|||
|
||||
|
||||
######################################################################################
|
||||
### 1) If you want to set your variables in moeo-conf.cmake and avoid the cmd line
|
||||
### 1) If you want to set your variables in peo-conf.cmake and avoid the cmd line
|
||||
######################################################################################
|
||||
|
||||
INCLUDE(peo-conf.cmake OPTIONAL)
|
||||
|
|
@ -33,12 +33,19 @@ INCLUDE(peo-conf.cmake OPTIONAL)
|
|||
|
||||
|
||||
######################################################################################
|
||||
### 2) Main project config
|
||||
### 2) Project properties
|
||||
######################################################################################
|
||||
|
||||
# set the project name
|
||||
PROJECT(ParadisEO-PEO)
|
||||
|
||||
SET(PACKAGE_BUGREPORT "paradiseo-help@lists.gforge.inria.fr" CACHE STRING "Package bug report" FORCE)
|
||||
SET(PACKAGE_NAME "ParadisEO-PEO Moving Objects" CACHE STRING "Package name" FORCE)
|
||||
SET(PACKAGE_STRING "ParadisEO-PEO 1.0" CACHE STRING "Package string full name" FORCE)
|
||||
SET(PACKAGE_VERSION "1.0" CACHE STRING "Package version" FORCE)
|
||||
SET(GLOBAL_VERSION "1.0" CACHE STRING "Global version" FORCE)
|
||||
SET(VERSION "1.0" CACHE STRING "Version" FORCE)
|
||||
|
||||
# check cmake version compatibility
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4 FATAL_ERROR)
|
||||
|
||||
|
|
@ -68,83 +75,87 @@ INCLUDE(CheckLibraryExists)
|
|||
|
||||
|
||||
######################################################################################
|
||||
### 4) SET main paths (can be defined in peo-conf.cmake)
|
||||
### 4) Include the main configuration variables
|
||||
######################################################################################
|
||||
|
||||
IF(NOT DEFINED PEO_DIR)
|
||||
SET(PEO_DIR ${ParadisEO-PEO_SOURCE_DIR} CACHE PATH "ParadisEO-PEO main directory")
|
||||
ENDIF(NOT DEFINED PEO_DIR)
|
||||
# The "config" variable must be provided on the command line
|
||||
IF(NOT DEFINED config OR NOT config)
|
||||
MESSAGE(FATAL_ERROR "The \"config\" variable must be set on the command line to
|
||||
give the path of the install configuration file. ")
|
||||
ENDIF(NOT DEFINED config OR NOT config)
|
||||
|
||||
# Need main EO directory path
|
||||
IF(NOT DEFINED EO_DIR OR NOT EO_DIR)
|
||||
SET(EO_DIR ${EOdir} CACHE PATH "ParadisEO-EO main directory" FORCE) # given on the command line
|
||||
ELSE(NOT DEFINED EO_DIR OR NOT EO_DIR)
|
||||
MESSAGE(STATUS "EOdir already defined as ${EO_DIR}")
|
||||
ENDIF(NOT DEFINED EO_DIR OR NOT EO_DIR)
|
||||
# Need the config file whose full path is given thanks to the "config" variable
|
||||
INCLUDE(${config})
|
||||
|
||||
# Set the main paths for EO
|
||||
IF(NOT DEFINED EO_SRC_DIR)
|
||||
SET(EO_SRC_DIR "${EO_DIR}/src")
|
||||
ENDIF(NOT DEFINED EO_SRC_DIR)
|
||||
|
||||
# Need main MO directory path
|
||||
IF(NOT DEFINED MO_DIR OR NOT MO_DIR)
|
||||
SET(MO_DIR ${MOdir} CACHE PATH "ParadisMO-MO main directory" FORCE) # given on the command line
|
||||
ELSE(NOT DEFINED MO_DIR OR NOT MO_DIR)
|
||||
MESSAGE(STATUS "MOdir already defined as ${MO_DIR}")
|
||||
ENDIF(NOT DEFINED MO_DIR OR NOT MO_DIR)
|
||||
|
||||
# Set the main paths for MO
|
||||
IF(NOT DEFINED MO_SRC_DIR)
|
||||
SET(MO_SRC_DIR "${MO_DIR}/src")
|
||||
ENDIF(NOT DEFINED MO_SRC_DIR)
|
||||
|
||||
IF(NOT DEFINED PEO_SRC_DIR)
|
||||
SET(PEO_SRC_DIR ${PEO_DIR}/src)
|
||||
ENDIF(NOT DEFINED PEO_SRC_DIR)
|
||||
|
||||
IF(NOT DEFINED PEO_DOC_DIR)
|
||||
SET(PEO_DOC_DIR ${PEO_DIR}/doc)
|
||||
ENDIF(NOT DEFINED PEO_DOC_DIR)
|
||||
######################################################################################
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 5) Paths checking
|
||||
### 4) Paths checking
|
||||
######################################################################################
|
||||
IF(EXISTS ${EO_DIR})
|
||||
MESSAGE (STATUS "Using ParadisEO-EO path: ${EO_DIR}")
|
||||
ELSE(EXISTS ${EO_DIR})
|
||||
MESSAGE (FATAL_ERROR "Could not find the ParadisEO-EO path: ${EO_DIR}. You should use : cmake . -DEOdir=<your path to paradiseo-eo> -DMOdir=<your path to paradiseo-mo>")
|
||||
ENDIF(EXISTS ${EO_DIR})
|
||||
|
||||
# Is it an absolute path ?
|
||||
SET (ABSOLUTE_PATH_REGEX "^/")
|
||||
IF(NOT ${EO_DIR} MATCHES "${ABSOLUTE_PATH_REGEX}")
|
||||
MESSAGE (FATAL_ERROR "${EO_DIR} MUST BE an absolute path")
|
||||
ENDIF(NOT ${EO_DIR} MATCHES "${ABSOLUTE_PATH_REGEX}")
|
||||
IF(WIN32)
|
||||
SET (ABSOLUTE_PATH_REGEX "^[A-Z]:|^[a-z]:")
|
||||
ELSE(WIN32)
|
||||
SET (ABSOLUTE_PATH_REGEX "^/")
|
||||
ENDIF(WIN32)
|
||||
|
||||
SET(EO_LIB_DIR "${EO_DIR}/src")
|
||||
|
||||
|
||||
IF(EXISTS ${MO_DIR})
|
||||
MESSAGE (STATUS "Using ParadisMO-MO path: ${MO_DIR}")
|
||||
ELSE(EXISTS ${MO_DIR})
|
||||
MESSAGE (FATAL_ERROR "Could not find the ParadisMO-MO path: ${MO_DIR}. You should use : cmake . -DEOdir=<your path to paradiseo-eo> -DMOdir=<your path to paradiseo-mo>")
|
||||
ENDIF(EXISTS ${MO_DIR})
|
||||
|
||||
# Is it an absolute path ?
|
||||
SET (ABSOLUTE_PATH_REGEX "^/")
|
||||
IF(NOT ${MO_DIR} MATCHES "${ABSOLUTE_PATH_REGEX}")
|
||||
MESSAGE (FATAL_ERROR "${MO_DIR} MUST BE an absolute path")
|
||||
ENDIF(NOT ${MO_DIR} MATCHES "${ABSOLUTE_PATH_REGEX}")
|
||||
SET(REQUIRED_PATHS "EO_SRC_DIR" "EO_BIN_DIR" "MO_SRC_DIR" "MO_BIN_DIR")
|
||||
FOREACH (path ${REQUIRED_PATHS})
|
||||
IF(EXISTS ${${path}})
|
||||
MESSAGE (STATUS "Using ${path}=${${path}}")
|
||||
ELSE(EXISTS ${${path}})
|
||||
MESSAGE (FATAL_ERROR "\n Cannot find \"${${path}}\". Please, fill \"${config}\" with a correct value for ${path} variable")
|
||||
ENDIF(EXISTS ${${path}})
|
||||
|
||||
IF(NOT ${${path}} MATCHES "${ABSOLUTE_PATH_REGEX}")
|
||||
MESSAGE (FATAL_ERROR "${${path}} MUST BE an absolute path")
|
||||
ENDIF(NOT ${${path}} MATCHES "${ABSOLUTE_PATH_REGEX}")
|
||||
ENDFOREACH (path ${REQUIRED_PATHS})
|
||||
######################################################################################
|
||||
|
||||
|
||||
#####################################################################################
|
||||
### 5) Manage the build type
|
||||
#####################################################################################
|
||||
|
||||
# the user should choose the build type on windows environments,excepted under cygwin (default=none)
|
||||
SET(CMAKE_DEFAULT_BUILD_TYPE None CACHE STRING "Variable that stores the default CMake build type" FORCE)
|
||||
|
||||
IF(WIN32 AND NOT CYGWIN)
|
||||
IF(NOT CMAKE_BUILD_TYPE)
|
||||
SET( CMAKE_BUILD_TYPE
|
||||
${CMAKE_DEFAULT_BUILD_TYPE} CACHE STRING
|
||||
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
|
||||
FORCE)
|
||||
ENDIF(NOT CMAKE_BUILD_TYPE)
|
||||
MESSAGE(STATUS "")
|
||||
MESSAGE(STATUS "Warning: The type of build is: ${CMAKE_BUILD_TYPE}.")
|
||||
MESSAGE(STATUS "The available types are: None Debug Release RelWithDebInfo MinSizeRel.")
|
||||
MESSAGE(STATUS "You can choose it with: cmake <path-to-source> -D<build-type>")
|
||||
MESSAGE(STATUS "")
|
||||
ENDIF(WIN32 AND NOT CYGWIN)
|
||||
|
||||
#####################################################################################
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 6) Where must cmake go now ?
|
||||
######################################################################################
|
||||
|
||||
SUBDIRS(doc src tutorial)
|
||||
SUBDIRS(doc src test tutorial)
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
######################################################################################
|
||||
### 7) Test config
|
||||
######################################################################################
|
||||
|
||||
#SET(ENABLE_CMAKE_TESTING TRUE CACHE BOOL "Should we test using Dart")
|
||||
|
||||
IF (ENABLE_CMAKE_TESTING)
|
||||
ENABLE_TESTING()
|
||||
ENDIF (ENABLE_CMAKE_TESTING)
|
||||
|
||||
######################################################################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue