CMakeLists.txt

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
cmake_minimum_required(VERSION 3.12)
project(planet-sdl)

if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
    add_custom_target(felspar-check)
    set_property(TARGET felspar-check PROPERTY EXCLUDE_FROM_ALL TRUE)
    add_custom_target(planet-examples)
    set_property(TARGET planet-examples PROPERTY EXCLUDE_FROM_ALL TRUE)
    include(requirements.cmake)

    add_compile_options(
            -Werror
            -fdiagnostics-show-option
            -Wall -Wextra -Wpedantic
        )
endif()

add_subdirectory(examples)
add_subdirectory(src)
add_subdirectory(test)