49 lines
1.1 KiB
CMake
49 lines
1.1 KiB
CMake
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})
|
|
|
|
find_package(Boost 1.56 REQUIRED COMPONENTS
|
|
program_options)
|
|
|
|
set(EXE_1_NAME loader)
|
|
file(
|
|
GLOB EXE_1_SOURCES
|
|
src/*.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 Boost::program_options)
|
|
target_include_directories(${EXE_1_NAME} PRIVATE include)
|
|
set_target_properties(${EXE_1_NAME} PROPERTIES
|
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${EXE_1_NAME})
|