glsl-basic/CMakeLists.txt

45 lines
995 B
CMake
Raw Normal View History

2023-10-13 10:25:05 +02:00
cmake_minimum_required(VERSION 3.27)
project(glsl-basic)
add_subdirectory(lib/glfw)
include_directories(
include/
lib/glad/include/
lib/glfw/include/
)
file(
GLOB VENDORS_SOURCES
lib/glad/src/glad.c
)
file(
GLOB PROJECT_HEADERS
include/*.h
)
file(
GLOB PROJECT_SOURCES
src/*.cpp
)
file(
GLOB PROJECT_SHADERS
data/shader/*.glsl
)
source_group("headers" FILES ${PROJECT_HEADERS})
source_group("shaders" FILES ${PROJECT_SHADERS})
source_group("sources" FILES ${PROJECT_SOURCES})
source_group("vendors" FILES ${VENDORS_SOURCES})
set(EXE_1_NAME loader)
file(
GLOB EXE_1_SOURCES
src/main.cpp
)
set(CMAKE_BINARY_DIR "bin")
add_executable(${EXE_1_NAME} ${EXE_1_SOURCES} ${PROJECT_HEADERS}
${PROJECT_SHADERS} ${VENDORS_SOURCES})
target_link_libraries(${EXE_1_NAME} glfw ${GLAD_LIBRARIES})
set_target_properties(${EXE_1_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${EXE_1_NAME})