Correct pathes detection.

This commit is contained in:
The Coriolis Project 2010-04-28 21:54:49 +00:00
parent 6e2abf7aa2
commit 9220380596
2 changed files with 23 additions and 27 deletions

View File

@ -14,20 +14,16 @@ MACRO(SETUP_PROJECT_PATHS project)
IF( NOT("$ENV{${project}_TOP}" STREQUAL "") )
MESSAGE("-- ${project}_TOP is set to $ENV{${project}_TOP}")
SET(PROJECT_MODULE_PATH "$ENV{${project}_TOP}/share/cmake_modules/")
LIST(FIND CMAKE_MODULE_PATH "${PROJECT_MODULE_PATH}" DIR_INDEX)
IF( DIR_INDEX LESS 0)
LIST(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_MODULE_PATH}")
ENDIF( DIR_INDEX LESS 0)
LIST(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_MODULE_PATH}")
ENDIF( NOT("$ENV{${project}_TOP}" STREQUAL "") )
IF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") )
MESSAGE("-- ${project}_USER_TOP is set to $ENV{${project}_USER_TOP}")
SET(PROJECT_MODULE_PATH "$ENV{${project}_USER_TOP}/share/cmake_modules/")
LIST(FIND CMAKE_MODULE_PATH "${PROJECT_MODULE_PATH}" DIR_INDEX)
IF( DIR_INDEX LESS 0)
LIST(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_MODULE_PATH}")
ENDIF( DIR_INDEX LESS 0)
LIST(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_MODULE_PATH}")
ENDIF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") )
LIST(REMOVE_DUPLICATES CMAKE_MODULE_PATH)
ENDMACRO(SETUP_PROJECT_PATHS project)
SETUP_PROJECT_PATHS(IO)
@ -41,6 +37,8 @@ ENDFOREACH(PATH)
SET(QT_USE_QTXML "true")
#SET(QT_USE_QTOPENGL "true")
LIST(INSERT CMAKE_MODULE_PATH 0 "${CRLCORE_SOURCE_DIR}/cmake_modules/")
FIND_PACKAGE(Boost 1.33.1 COMPONENTS program_options REQUIRED)
FIND_PACKAGE(Qt4 REQUIRED) # find and setup Qt4 for this project
FIND_PACKAGE(BISON REQUIRED)
@ -50,8 +48,6 @@ FIND_PACKAGE(OPENACCESS)
FIND_PACKAGE(IO REQUIRED)
FIND_PACKAGE(HURRICANE REQUIRED)
#LIST(INSERT CMAKE_MODULE_PATH 0 "${CRLCORE_SOURCE_DIR}/cmake_modules/")
SET_LIB_LINK_MODE()
ADD_SUBDIRECTORY(src)

View File

@ -11,23 +11,23 @@ SET(CORIOLIS_DIR_MESSAGE "Set the CORIOLIS_INCLUDE_DIR cmake cache entry to the
# don't even bother under WIN32
IF(UNIX)
# Setup the DIR_SEARCH_PATH.
MACRO(SETUP_SEARCH_DIR project)
IF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") )
MESSAGE("-- ${project}_USER_TOP is set to $ENV{${project}_USER_TOP}")
LIST(FIND ${project}_DIR_SEARCH "${${project}_DIR_SEARCH}" DIR_INDEX)
IF( DIR_INDEX LESS 0)
LIST(INSERT ${project}_DIR_SEARCH 0 "$ENV{${project}_USER_TOP}")
ENDIF( DIR_INDEX LESS 0)
ENDIF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") )
IF( NOT("$ENV{${project}_TOP}" STREQUAL "") )
MESSAGE("-- ${project}_TOP is set to $ENV{${project}_TOP}")
LIST(FIND ${project}_DIR_SEARCH "${${project}_DIR_SEARCH}" DIR_INDEX)
IF( DIR_INDEX LESS 0)
LIST(INSERT ${project}_DIR_SEARCH 0 "$ENV{${project}_TOP}")
ENDIF( DIR_INDEX LESS 0)
ENDIF( NOT("$ENV{${project}_TOP}" STREQUAL "") )
ENDMACRO(SETUP_SEARCH_DIR project)
#MACRO(SETUP_SEARCH_DIR project)
# IF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") )
# MESSAGE("-- ${project}_USER_TOP is set to $ENV{${project}_USER_TOP}")
# LIST(FIND ${project}_DIR_SEARCH "${${project}_DIR_SEARCH}" DIR_INDEX)
# IF( DIR_INDEX LESS 0)
# LIST(INSERT ${project}_DIR_SEARCH 0 "$ENV{${project}_USER_TOP}")
# ENDIF( DIR_INDEX LESS 0)
# ENDIF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") )
#
# IF( NOT("$ENV{${project}_TOP}" STREQUAL "") )
# MESSAGE("-- ${project}_TOP is set to $ENV{${project}_TOP}")
# LIST(FIND ${project}_DIR_SEARCH "${${project}_DIR_SEARCH}" DIR_INDEX)
# IF( DIR_INDEX LESS 0)
# LIST(INSERT ${project}_DIR_SEARCH 0 "$ENV{${project}_TOP}")
# ENDIF( DIR_INDEX LESS 0)
# ENDIF( NOT("$ENV{${project}_TOP}" STREQUAL "") )
#ENDMACRO(SETUP_SEARCH_DIR project)
SETUP_SEARCH_DIR(CORIOLIS)
#