blob: e13ae4eb38d5ccf5e5a9fd3b38d70d4b2b272f0e [file] [log] [blame]
cmake_minimum_required(VERSION 3.10)
project(eskia CXX)
set(CMAKE_CXX_STANDARD 14)
add_library(eskia src/draw.cc)
option(DEV_TOOLS "Build development tools (tests, etc.)?" OFF)
if (DEV_TOOLS)
find_package(SDL2 REQUIRED)
add_library (slides tools/slides.cc)
target_link_libraries (slides PRIVATE eskia)
add_executable (bench tools/bench.cc)
target_link_libraries (bench PRIVATE eskia slides)
add_executable (demo tools/demo.cc)
target_include_directories(demo SYSTEM PRIVATE ${SDL2_INCLUDE_DIRS})
target_link_libraries (demo PRIVATE eskia slides ${SDL2_LIBRARIES})
add_library (stb_image_write tools/stb_image_write.cc)
target_include_directories(stb_image_write SYSTEM PUBLIC ext/stb)
add_executable (test tools/test.cc)
target_link_libraries (test PRIVATE eskia slides stb_image_write)
endif()