This repository has been archived on 2026-03-28. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
eodev/eo/tutorial/Lesson2/CMakeLists.txt

68 lines
2.5 KiB
CMake

######################################################################################
### 1) Include the sources
######################################################################################
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src)
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/ga)
INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils)
######################################################################################
######################################################################################
### 2) Specify where CMake can find the libraries
######################################################################################
IF(NOT WIN32 OR CYGWIN)
LINK_DIRECTORIES(${EO_BINARY_DIR}/lib)
ENDIF(NOT WIN32 OR CYGWIN)
# especially for Visual Studio
IF(WIN32 AND NOT CYGWIN)
LINK_DIRECTORIES(${EO_BINARY_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)
######################################################################################
######################################################################################
### 4) Optionnal
######################################################################################
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(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)
######################################################################################