aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
blob: d25a131ab6e6da974726e4ed0df241d9432bb847 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
cmake_minimum_required(VERSION 3.15)
project(space)

find_package(raylib 3.0 REQUIRED) # Requires at least version 3.0

set(CMAKE_C_STANDARD 11) # Requires C11 standard

add_executable(${PROJECT_NAME} src/main.cpp src/window.cpp src/gameplay.cpp)

target_link_libraries(${PROJECT_NAME} raylib m pthread dl)

# 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()