* All Tools:
- Change: New structure for the installation & CMake system. * Tools are now grouped in "projects". There are three projects: 1. - IO: Standalones parsers/drivers (IO_USER_TOP, IO_TOP). 2. - Coriolis: Base & digital tools (CORIOLIS_USER_TOP, CORIOLIS_TOP). 3. - Chams: Analogic tools (CHAMS_USER_TOP, CHAMS_TOP). Each *project* has a two "TOP" environement variables, for example: IO_TOP and IO_USER_TOP. Thoses variables are the only ones useds to locate the tool (CMake modules, headers & libraries). The local path always takes precedence over the global one. The localisation process occurs in each tool top CMakeLists.txt where the macro SETUP_PROJECT_PATH is to be defined. There is no way to put it in a shared includes file as it's the macro precisely used to locates the includes... You have to call the macro once for each project you wants to uses: SETUP_PROJECT_PATHS(IO) SETUP_PROJECT_PATHS(CORIOLIS) * In FindTOOL.cmake, supress the <TOOL>_DIR_SEARCH and uses the <PROJECT>_DIR_SEARCH instead (example: CORIOLIS_DIR_SEARCH). * buildCoriolis.py modificated according to the new "TOP" scheme.
This commit is contained in:
parent
9c72b88210
commit
836f546a46
|
@ -1,13 +1,14 @@
|
|||
PROJECT(HURRICANE)
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0)
|
||||
|
||||
IF(COMMAND CMAKE_POLICY)
|
||||
CMAKE_POLICY(SET CMP0003 NEW)
|
||||
ENDIF(COMMAND CMAKE_POLICY)
|
||||
|
||||
SET(CMAKE_MODULE_PATH "${HURRICANE_SOURCE_DIR}/cmake_modules/")
|
||||
LIST(INSERT CMAKE_MODULE_PATH 0 "${HURRICANE_SOURCE_DIR}/cmake_modules/")
|
||||
|
||||
OPTION(BUILD_DOC "Build the documentation (doxygen)" OFF)
|
||||
OPTION(BUILD_DOC "Build the documentation (doxygen)" OFF)
|
||||
|
||||
#SET_LIB_LINK_MODE()
|
||||
IF(NOT BUILD_SHARED_LIBS)
|
||||
|
|
|
@ -53,25 +53,18 @@ MACRO(SET_LIB_LINK_MODE)
|
|||
ENDIF(NOT BUILD_SHARED_LIBS)
|
||||
ENDMACRO(SET_LIB_LINK_MODE)
|
||||
|
||||
|
||||
SET(HURRICANE_INCLUDE_PATH_DESCRIPTION "The directory containing the Hurricane include files. E.g /usr/local/include or /asim/coriolis/include")
|
||||
SET(HURRICANE_LIBRARY_PATH_DESCRIPTION "The directory containing the Hurricane library files. E.g /usr/local/lib or /asim/coriolis/lib")
|
||||
SET(HURRICANE_DIR_MESSAGE "Set the HURRICANE_INCLUDE_DIR cmake cache entry to the ${HURRICANE_INCLUDE_PATH_DESCRIPTION}")
|
||||
|
||||
# don't even bother under WIN32
|
||||
IF(UNIX)
|
||||
|
||||
SET(HURRICANE_DIR_SEARCH $ENV{HURRICANE_TOP})
|
||||
IF(HURRICANE_DIR_SEARCH)
|
||||
FILE(TO_CMAKE_PATH ${HURRICANE_DIR_SEARCH} HURRICANE_DIR_SEARCH)
|
||||
ENDIF(HURRICANE_DIR_SEARCH)
|
||||
|
||||
#
|
||||
# Look for an installation.
|
||||
#
|
||||
FIND_PATH(HURRICANE_INCLUDE_PATH NAMES hurricane/Cell.h PATHS
|
||||
# Look in other places.
|
||||
${HURRICANE_DIR_SEARCH}
|
||||
${CORIOLIS_DIR_SEARCH}
|
||||
PATH_SUFFIXES include
|
||||
# Help the user find it if we cannot.
|
||||
DOC "${HURRICANE_INCLUDE_PATH_DESCRIPTION}"
|
||||
|
@ -79,7 +72,7 @@ IF(UNIX)
|
|||
|
||||
FIND_LIBRARY(HURRICANE_LIBRARY_PATH
|
||||
NAMES hurricane
|
||||
PATHS ${HURRICANE_DIR_SEARCH}
|
||||
PATHS ${CORIOLIS_DIR_SEARCH}
|
||||
PATH_SUFFIXES lib
|
||||
# Help the user find it if we cannot.
|
||||
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
|
||||
|
@ -87,7 +80,7 @@ IF(UNIX)
|
|||
|
||||
FIND_PATH(HURRICANE_VIEWER_INCLUDE_PATH
|
||||
NAMES hurricane/viewer/CellWidget.h
|
||||
PATHS ${HURRICANE_DIR_SEARCH}
|
||||
PATHS ${CORIOLIS_DIR_SEARCH}
|
||||
PATH_SUFFIXES include
|
||||
# Help the user find it if we cannot.
|
||||
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
|
||||
|
@ -95,7 +88,7 @@ IF(UNIX)
|
|||
|
||||
FIND_LIBRARY(HURRICANE_VIEWER_LIBRARY_PATH
|
||||
NAMES viewer
|
||||
PATHS ${HURRICANE_DIR_SEARCH}
|
||||
PATHS ${CORIOLIS_DIR_SEARCH}
|
||||
PATH_SUFFIXES lib
|
||||
# Help the user find it if we cannot.
|
||||
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
|
||||
|
@ -103,7 +96,7 @@ IF(UNIX)
|
|||
|
||||
FIND_PATH(HURRICANE_PYTHON_INCLUDE_PATH
|
||||
NAMES hurricane/isobar/PyCell.h
|
||||
PATHS ${HURRICANE_DIR_SEARCH}
|
||||
PATHS ${CORIOLIS_DIR_SEARCH}
|
||||
PATH_SUFFIXES include
|
||||
# Help the user find it if we cannot.
|
||||
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
|
||||
|
@ -111,7 +104,7 @@ IF(UNIX)
|
|||
|
||||
FIND_LIBRARY(HURRICANE_PYTHON_LIBRARY_PATH
|
||||
NAMES isobar
|
||||
PATHS ${HURRICANE_DIR_SEARCH}
|
||||
PATHS ${CORIOLIS_DIR_SEARCH}
|
||||
PATH_SUFFIXES lib
|
||||
# Help the user find it if we cannot.
|
||||
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
|
||||
|
|
Loading…
Reference in New Issue