aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authornathansmith117 <thenathansmithsmith@gmail.com>2024-02-14 22:20:30 +0000
committernathansmith117 <thenathansmithsmith@gmail.com>2024-02-14 22:20:30 +0000
commitc2d4a7939fe7f06384f9364e7877c618d9466484 (patch)
tree8676f9821c4b766cde64191a5a91f0a6f7812203 /CMakeLists.txt
downloadPenguinYippies-c2d4a7939fe7f06384f9364e7877c618d9466484.tar.gz
PenguinYippies-c2d4a7939fe7f06384f9364e7877c618d9466484.tar.bz2
PenguinYippies-c2d4a7939fe7f06384f9364e7877c618d9466484.zip
first commit
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..040d5b7
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,24 @@
+cmake_minimum_required(VERSION 3.27.7)
+
+project(PenguinYippies VERSION 1.0)
+
+find_package(raylib 3.0 REQUIRED)
+
+set(C_STANDARD 99)
+set(C_STANDARD_REQUIRED ON)
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
+# Add source files.
+file(GLOB SRC_FILES src/*.c)
+
+add_executable(${PROJECT_NAME} ${SRC_FILES})
+
+target_include_directories(${PROJECT_NAME} PUBLIC include src)
+target_link_libraries(${PROJECT_NAME} raylib m)
+
+# 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()