21 lines
573 B
CMake
21 lines
573 B
CMake
cmake_minimum_required(VERSION 3.8)
|
|
|
|
project(Chess C CXX)
|
|
|
|
find_package(SDL2 REQUIRED)
|
|
|
|
file(GLOB sources
|
|
CONFIGURE_DEPENDS
|
|
src/*.cpp)
|
|
|
|
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)
|