xormod/CMakeLists.txt

30 lines
561 B
CMake
Raw Permalink Normal View History

2021-04-10 19:30:51 +00:00
cmake_minimum_required(VERSION 3.18)
project(xormod C)
find_package(SDL2)
2021-04-11 09:17:53 +00:00
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")
2021-04-16 13:08:36 +00:00
add_compile_options(-Wall -Wextra -Werror=return-type)
2021-04-11 09:17:53 +00:00
include_directories("${CMAKE_BINARY_DIR}/config")
2021-04-10 19:30:51 +00:00
add_executable(xormod
"EGA8x8.c"
2021-04-12 19:15:41 +00:00
"field.c"
"font.c"
"picture.c"
"xormod.c"
2021-04-10 19:30:51 +00:00
)
target_link_libraries(xormod SDL2::SDL2)