fix build system : make eo/edo tests work
This commit is contained in:
parent
0829afceb9
commit
06ff0b682b
17 changed files with 328 additions and 326 deletions
|
|
@ -2,63 +2,63 @@
|
|||
### 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(FirstBitGA FirstBitGA.cpp)
|
||||
ADD_EXECUTABLE(FirstRealGA FirstRealGA.cpp)
|
||||
ADD_EXECUTABLE(exercise1.3 exercise1.3.cpp)
|
||||
add_executable(FirstBitGA FirstBitGA.cpp)
|
||||
add_executable(FirstRealGA FirstRealGA.cpp)
|
||||
add_executable(exercise1.3 exercise1.3.cpp)
|
||||
|
||||
ADD_DEPENDENCIES(FirstBitGA ga eo eoutils)
|
||||
ADD_DEPENDENCIES(FirstRealGA ga eo eoutils)
|
||||
ADD_DEPENDENCIES(exercise1.3 ga eo eoutils)
|
||||
add_dependencies(FirstBitGA ga eo eoutils)
|
||||
add_dependencies(FirstRealGA ga eo eoutils)
|
||||
add_dependencies(exercise1.3 ga eo eoutils)
|
||||
|
||||
######################################################################################
|
||||
### 4) Optionnal
|
||||
######################################################################################
|
||||
|
||||
SET(FIRSTBITGA_VERSION ${GLOBAL_VERSION})
|
||||
SET_TARGET_PROPERTIES(FirstBitGA PROPERTIES VERSION "${FIRSTBITGA_VERSION}")
|
||||
set(FIRSTBITGA_VERSION ${GLOBAL_VERSION})
|
||||
set_target_properties(FirstBitGA PROPERTIES VERSION "${FIRSTBITGA_VERSION}")
|
||||
|
||||
SET(FIRSTREALGA_VERSION ${GLOBAL_VERSION})
|
||||
SET_TARGET_PROPERTIES(FirstRealGA PROPERTIES VERSION "${FIRSTREALGA_VERSION}")
|
||||
set(FIRSTREALGA_VERSION ${GLOBAL_VERSION})
|
||||
set_target_properties(FirstRealGA PROPERTIES VERSION "${FIRSTREALGA_VERSION}")
|
||||
|
||||
SET(EXERCICE13_VERSION ${GLOBAL_VERSION})
|
||||
SET_TARGET_PROPERTIES(exercise1.3 PROPERTIES VERSION "${EXERCICE13_VERSION}")
|
||||
set(EXERCICE13_VERSION ${GLOBAL_VERSION})
|
||||
set_target_properties(exercise1.3 PROPERTIES VERSION "${EXERCICE13_VERSION}")
|
||||
|
||||
######################################################################################
|
||||
### 5) Link the librairies for the targets
|
||||
######################################################################################
|
||||
|
||||
TARGET_LINK_LIBRARIES(FirstBitGA ga eo eoutils)
|
||||
TARGET_LINK_LIBRARIES(FirstRealGA ga eo eoutils)
|
||||
TARGET_LINK_LIBRARIES(exercise1.3 ga eo eoutils)
|
||||
target_link_libraries(FirstBitGA ga eo eoutils)
|
||||
target_link_libraries(FirstRealGA ga eo eoutils)
|
||||
target_link_libraries(exercise1.3 ga eo eoutils)
|
||||
|
||||
######################################################################################
|
||||
### 6) Configure project installation paths
|
||||
######################################################################################
|
||||
|
||||
INSTALL(TARGETS FirstBitGA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson1 COMPONENT examples)
|
||||
INSTALL(TARGETS FirstRealGA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson1 COMPONENT examples)
|
||||
INSTALL(TARGETS exercise1.3 RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson1 COMPONENT examples)
|
||||
install(TARGETS FirstBitGA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson1 COMPONENT examples)
|
||||
install(TARGETS FirstRealGA RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson1 COMPONENT examples)
|
||||
install(TARGETS exercise1.3 RUNTIME DESTINATION local/share${INSTALL_SUB_DIR}/eo/examples/Lesson1 COMPONENT examples)
|
||||
|
||||
######################################################################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue