fix build system : make eo/edo tests work

This commit is contained in:
Johann Dreo 2012-10-07 19:48:15 +02:00
commit 06ff0b682b
17 changed files with 328 additions and 326 deletions

View file

@ -2,59 +2,59 @@
### 1) Include the sources
######################################################################################
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/ga)
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils)
include_directories(${EO_SRC_DIR}/src)
include_directories(${EO_SRC_DIR}/src/ga)
include_directories(${EO_SRC_DIR}/src/utils)
######################################################################################
### 2) Specify where CMake can find the libraries
######################################################################################
IF(NOT WIN32 OR CYGWIN)
LINK_DIRECTORIES(${EO_BIN_DIR}/lib)
ENDIF(NOT WIN32 OR CYGWIN)
if(NOT WIN32 OR CYGWIN)
link_directories(${EO_BIN_DIR}/lib)
endif(NOT WIN32 OR CYGWIN)
# especially for Visual Studio
IF(WIN32 AND NOT CYGWIN)
LINK_DIRECTORIES(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE})
ENDIF(WIN32 AND NOT CYGWIN)
if(WIN32 AND NOT CYGWIN)
link_directories(${EO_BIN_DIR}\\lib\\${CMAKE_BUILD_TYPE})
endif(WIN32 AND NOT CYGWIN)
######################################################################################
### 3) Define your targets
######################################################################################
# no matter what is the OS, hopefully
ADD_EXECUTABLE(FirstBitEA FirstBitEA.cpp)
ADD_EXECUTABLE(FirstRealEA FirstRealEA.cpp)
ADD_EXECUTABLE(exercise2.3 exercise2.3.cpp)
add_executable(FirstBitEA FirstBitEA.cpp)
add_executable(FirstRealEA FirstRealEA.cpp)
add_executable(exercise2.3 exercise2.3.cpp)
######################################################################################
### 4) Optionnal
######################################################################################
SET(FIRSTBITEA_VERSION ${GLOBAL_VERSION})
SET_TARGET_PROPERTIES(FirstBitEA PROPERTIES VERSION "${FIRSTBITEA_VERSION}")
set(FIRSTBITEA_VERSION ${GLOBAL_VERSION})
set_target_properties(FirstBitEA PROPERTIES VERSION "${FIRSTBITEA_VERSION}")
SET(FIRSTREALEA_VERSION ${GLOBAL_VERSION})
SET_TARGET_PROPERTIES(FirstRealEA PROPERTIES VERSION "${FIRSTREALEA_VERSION}")
set(FIRSTREALEA_VERSION ${GLOBAL_VERSION})
set_target_properties(FirstRealEA PROPERTIES VERSION "${FIRSTREALEA_VERSION}")
SET(EXERCICE23_VERSION ${GLOBAL_VERSION})
SET_TARGET_PROPERTIES(exercise2.3 PROPERTIES VERSION "${EXERCICE23_VERSION}")
set(EXERCICE23_VERSION ${GLOBAL_VERSION})
set_target_properties(exercise2.3 PROPERTIES VERSION "${EXERCICE23_VERSION}")
######################################################################################
### 5) Link the librairies for the targets
######################################################################################
TARGET_LINK_LIBRARIES(FirstBitEA ga eo eoutils)
TARGET_LINK_LIBRARIES(FirstRealEA ga eo eoutils)
TARGET_LINK_LIBRARIES(exercise2.3 ga eo eoutils)
target_link_libraries(FirstBitEA ga eo eoutils)
target_link_libraries(FirstRealEA ga eo eoutils)
target_link_libraries(exercise2.3 ga eo eoutils)
######################################################################################
### 6) Configure project installation paths
######################################################################################
INSTALL(TARGETS FirstBitEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples)
INSTALL(TARGETS FirstRealEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples)
INSTALL(TARGETS exercise2.3 RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples)
install(TARGETS FirstBitEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples)
install(TARGETS FirstRealEA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples)
install(TARGETS exercise2.3 RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson2 COMPONENT examples)
######################################################################################