cmake modifs for ELSEIF compatibility

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@579 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
legrand 2007-07-18 13:00:27 +00:00
commit 52e89bbcde
8 changed files with 105 additions and 78 deletions

View file

@ -19,9 +19,10 @@ INCLUDE_DIRECTORIES(${TSP_SRC_DIR})
# --> UNIX
IF(UNIX)
LINK_DIRECTORIES(${EO_SRC_DIR} ${EO_SRC_DIR}/utils ${TSP_BINARY_DIR}/lib)
ENDIF(UNIX)
# --> WIN
ELSEIF(WIN32)
IF(WIN32)
# "CMAKE_BUILD_TYPE" supposed to be given on the command line, default=Debug
IF (NOT DEFINED CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Debug)
@ -30,12 +31,14 @@ ELSEIF(WIN32)
IF (CMAKE_BUILD_TYPE STREQUAL Debug)
LINK_DIRECTORIES(${TSP_BINARY_DIR}\\debug)
LINK_DIRECTORIES(${EO_LIB_DIR}\\debug)
ELSEIF(CMAKE_BUILD_TYPE STREQUAL Release)
ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
IF(CMAKE_BUILD_TYPE STREQUAL Release)
LINK_DIRECTORIES(${TSP_BINARY_DIR}\\release)
LINK_DIRECTORIES(${EO_LIB_DIR}\\release)
ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
ENDIF(UNIX)
ENDIF(WIN32)
######################################################################################
@ -72,9 +75,10 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(tabu_search tsp)
TARGET_LINK_LIBRARIES(tabu_search eo)
TARGET_LINK_LIBRARIES(tabu_search eoutils)
ENDIF(UNIX)
# --> WIN
ELSEIF(WIN32)
IF(WIN32)
# "CMAKE_BUILD_TYPE" supposed to be given on the command line, default=Debug
IF (NOT DEFINED CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Debug)
@ -83,16 +87,16 @@ ELSEIF(WIN32)
IF (CMAKE_BUILD_TYPE STREQUAL Debug)
TARGET_LINK_LIBRARIES(tabu_search tsp)
TARGET_LINK_LIBRARIES(tabu_search eod)
TARGET_LINK_LIBRARIES(tabu_search eoutilsd)
ELSEIF(CMAKE_BUILD_TYPE STREQUAL Release)
TARGET_LINK_LIBRARIES(tabu_search eoutilsd)
ELSE(CMAKE_BUILD_TYPE STREQUAL Debug)
IF(CMAKE_BUILD_TYPE STREQUAL Release)
TARGET_LINK_LIBRARIES(tabu_search tsp)
TARGET_LINK_LIBRARIES(tabu_search eo)
TARGET_LINK_LIBRARIES(tabu_search eoutils)
ELSE(CMAKE_BUILD_TYPE STREQUAL Debug)
MESSAGE(FATAL_ERROR " Cmake build type can only be \"Debug\" or \"Release\" ")
ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
TARGET_LINK_LIBRARIES(tabu_search eoutils)
ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
ENDIF(UNIX)
ENDIF(WIN32)
######################################################################################