KBLE C rewrite
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
764 B

cmake_minimum_required(VERSION 3.18)
# Add render targets here.
project(kble C)
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
-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)