aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2022-01-02 20:29:46 +0100
committersalaaad2 <arthurdurant263@gmail.com>2022-01-02 20:29:46 +0100
commit30e2f2436fb1bdc688101e97f65ec1cf49ddb35d (patch)
treedcd31c2c405b55a9c301f89eda71434e1c3e6a31 /CMakeLists.txt
downloadthreshold-30e2f2436fb1bdc688101e97f65ec1cf49ddb35d.tar.gz
threshold-30e2f2436fb1bdc688101e97f65ec1cf49ddb35d.tar.bz2
threshold-30e2f2436fb1bdc688101e97f65ec1cf49ddb35d.tar.xz
threshold-30e2f2436fb1bdc688101e97f65ec1cf49ddb35d.tar.zst
threshold-30e2f2436fb1bdc688101e97f65ec1cf49ddb35d.zip
initial commit
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()