2024-02-19 20:44:33 -05:00
|
|
|
cmake_minimum_required(VERSION 3.8)
|
|
|
|
|
2024-02-22 19:00:48 -05:00
|
|
|
project(Chess C CXX)
|
2024-02-19 20:44:33 -05:00
|
|
|
|
|
|
|
find_package(SDL2 REQUIRED)
|
|
|
|
|
2024-02-22 19:00:48 -05:00
|
|
|
file(GLOB sources
|
|
|
|
CONFIGURE_DEPENDS
|
2024-02-19 20:44:33 -05:00
|
|
|
src/*.cpp)
|
|
|
|
|
2024-02-22 19:00:48 -05:00
|
|
|
add_executable(Chess ${sources})
|
|
|
|
set_target_properties(Chess PROPERTIES CXX_STANDARD 17) # set standard level
|
|
|
|
target_compile_options(Chess PRIVATE
|
|
|
|
-Wall -Wextra -Wredundant-decls -Wcast-align
|
|
|
|
-Wshadow -Wnon-virtual-dtor
|
|
|
|
-Wunused -Woverloaded-virtual -Wpedantic -Wconversion
|
|
|
|
-Wsign-conversion -Wmisleading-indentation
|
|
|
|
-Wnull-dereference -Wformat=2
|
|
|
|
)
|
|
|
|
target_link_libraries(Chess SDL2::SDL2)
|