aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..d25a131
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,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()