xormod/CMakeLists.txt

26 lines
475 B
CMake
Raw 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")
include_directories("${CMAKE_BINARY_DIR}/config")
2021-04-10 19:30:51 +00:00
add_executable(xormod
"xormod.c"
"font.c"
"EGA8x8.c"
)
target_link_libraries(xormod SDL2::SDL2)