genetic-images/CMakeLists.txt

46 lines
1.4 KiB
CMake
Raw Normal View History

2019-03-26 15:07:08 +00:00
cmake_minimum_required(VERSION 3.10)
2019-03-19 09:14:19 +00:00
2019-03-19 10:01:39 +00:00
project("GeneticImages"
VERSION 0.1
DESCRIPTION "Recreate reference images with genetic algorithms"
HOMEPAGE_URL "https://labs.phundrak.fr/phundrak/genetic-images"
2019-03-19 09:14:19 +00:00
LANGUAGES CXX)
2019-03-19 10:01:39 +00:00
file(GLOB SRC_FILES "src/*.cc")
2019-03-27 13:31:25 +00:00
file(GLOB TEST_FILES "tests/tests.cc")
2019-03-19 09:14:19 +00:00
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
include(functions)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
enable_cxx_compiler_flag_if_supported("-Wall")
enable_cxx_compiler_flag_if_supported("-pedantic")
2019-03-21 01:49:00 +00:00
enable_cxx_compiler_flag_if_supported("-O3")
enable_cxx_compiler_flag_if_supported("-flto")
2019-03-19 09:14:19 +00:00
# include_directories(<PUBLIC HEADER DIRECTORIES>)
2019-03-19 10:01:39 +00:00
set(TGT genetic-image)
2019-03-27 13:31:25 +00:00
set(TESTTGT genetic-image-tests)
2019-03-19 10:01:39 +00:00
add_executable(${TGT} ${SRC_FILES})
2019-03-27 13:31:25 +00:00
add_executable(${TESTTGT} ${TEST_FILES})
2019-03-19 10:01:39 +00:00
target_compile_features(${TGT} PRIVATE cxx_std_17)
2019-03-27 13:31:25 +00:00
target_compile_features(${TESTTGT} PRIVATE cxx_std_17)
2019-03-19 10:01:39 +00:00
target_include_directories(${TGT} PRIVATE include/genimg)
2019-03-27 13:31:25 +00:00
target_include_directories(${TESTTGT} PRIVATE include/genimg)
2019-03-20 11:34:46 +00:00
target_link_libraries(${TGT} ${CONAN_LIBS} stdc++fs)
2019-03-27 13:31:25 +00:00
target_link_libraries(${TESTTGT} ${CONAN_LIBS} stdc++fs)
2019-03-19 09:14:19 +00:00
# OS specific instructions.
if(APPLE)
elseif(WIN32)
# Windows developer environment specific instructions.
if(MINGW)
elseif(MSYS)
elseif(CYGWIN)
endif()
elseif(UNIX)
else()
endif()