kble-c/CMakeLists.txt

35 lines
764 B
CMake
Raw Normal View History

2021-03-18 17:27:34 +01:00
cmake_minimum_required(VERSION 3.18)
# Add render targets here.
project(kble C)
2021-03-18 17:27:34 +01:00
include_directories(include)
set(SOURCES
src/main.c
src/level.c
)
set(SOURCES_NCURSES
src/ncurses/init.c
)
set(SOURCES_RAYLIB
src/raylib/init.c
)
set(FLAGS
2021-03-18 17:27:34 +01:00
-Wall -Wextra -Wshadow -Wswitch-default -Wswitch-enum
-Wunreachable-code -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Werror-implicit-function-declaration
-g -Os
)
add_executable(kble-ncurses ${SOURCES} ${SOURCES_NCURSES})
add_executable(kble-raylib ${SOURCES} ${SOURCES_RAYLIB})
target_compile_options(kble-ncurses PRIVATE ${FLAGS} -DNCURSES)
target_compile_options(kble-raylib PRIVATE ${FLAGS} -DRAYLIB)
target_link_libraries(kble-ncurses ncurses)
target_link_libraries(kble-raylib raylib)