From 6d776075fff6e3f77cf9ca467f94cdf20cf8fc7d Mon Sep 17 00:00:00 2001 From: ColleagueRiley Date: Wed, 1 Jan 2025 12:33:50 -0500 Subject: [PATCH] add CMakeFile --- .../GLFW_windowing/CMakeLists.txt | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 examples/RSGL_rendering/GLFW_windowing/CMakeLists.txt diff --git a/examples/RSGL_rendering/GLFW_windowing/CMakeLists.txt b/examples/RSGL_rendering/GLFW_windowing/CMakeLists.txt new file mode 100644 index 0000000..c1d5e05 --- /dev/null +++ b/examples/RSGL_rendering/GLFW_windowing/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.10) + +project(GLFWExample) + +set(SRC main.c) + +# Set libraries and extensions based on OS +if(WIN32) + set(LIBS -lglfw3 -lgdi32 -lopengl32) +elseif(APPLE) + set(LIBS -lglfw -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo) +elseif(UNIX) + set(LIBS -lglfw -lGL -lm -ldl -lpthread) +endif() + +# Include directories +include_directories(${CMAKE_SOURCE_DIR}) + +# Add executable +add_executable(main${EXT} ${SRC}) + +# Link libraries +target_include_directories(main PRIVATE ../../../renderers/RSGL) +target_include_directories(main PRIVATE ../../../) +target_link_libraries(main${EXT} ${LIBS}) \ No newline at end of file