mirror of
https://github.com/nicbarker/clay.git
synced 2025-04-20 05:08:04 +00:00
add CMakeFile
This commit is contained in:
parent
faaaa6b52e
commit
6d776075ff
25
examples/RSGL_rendering/GLFW_windowing/CMakeLists.txt
Normal file
25
examples/RSGL_rendering/GLFW_windowing/CMakeLists.txt
Normal file
@ -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})
|
Loading…
Reference in New Issue
Block a user