mirror of
https://github.com/nicbarker/clay.git
synced 2025-04-22 06:08:03 +00:00
25 lines
636 B
CMake
25 lines
636 B
CMake
|
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})
|