aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
blob: 2228b3983d55faad5163e07d119d6902cca3b3ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
cmake_minimum_required(VERSION 3.15)
project(wip-shooter)

find_package(SDL2 REQUIRED) # Requires at least version 3.0
include_directories(${SDL2_INCLUDE_DIRS})

set(CMAKE_C_STANDARD 11) # Requires C11 standard

set (CMAKE_CXX_STANDARD 17)

add_executable(${PROJECT_NAME}
    src/city.c)

target_link_libraries(${PROJECT_NAME} ${SDL2_LIBRARIES})

# Checks if OSX and links appropriate frameworks (only required on MacOS)
if (APPLE)
    target_link_libraries(${PROJECT_NAME} "-framework IOKit")
    target_link_libraries(${PROJECT_NAME} "-framework Cocoa")
    target_link_libraries(${PROJECT_NAME} "-framework OpenGL")
endif()