cmake_minimum_required(VERSION 3.18) project(xormod C) find_package(SDL2) if(APPLE) set(DETECTED_ACCEL_PLATFORM "METAL") else() set(DETECTED_ACCEL_PLATFORM "OPENGL") endif() set(ACCEL_PLATFORM ${DETECTED_ACCEL_PLATFORM} CACHE STRING "Acceleration") configure_file("platform.h.in" "config/platform.h") add_compile_options(-Wall -Wextra -Werror=return-type) include_directories("${CMAKE_BINARY_DIR}/config") add_executable(xormod "EGA8x8.c" "field.c" "font.c" "picture.c" "xormod.c" ) target_link_libraries(xormod SDL2::SDL2)