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)