34 lines
878 B
CMake
34 lines
878 B
CMake
cmake_minimum_required(VERSION 3.28)
|
|
project(oatmeal)
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
# Include the libary
|
|
add_subdirectory(oatmeal)
|
|
|
|
file(GLOB CMAKE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/cmake/*.cmake")
|
|
foreach(cmake_file ${CMAKE_FILES})
|
|
include(${cmake_file})
|
|
endforeach()
|
|
|
|
# TODO: Add a check to disable compiling the examples
|
|
|
|
set(ASSET_DIR "assets/")
|
|
set(SHADERS_DIR "assets/shaders")
|
|
|
|
create_copy_folder_target(copy_assets ${CMAKE_CURRENT_SOURCE_DIR}/assets ${CMAKE_CURRENT_BINARY_DIR}/assets)
|
|
create_slang_shader_target(slang_shaders
|
|
"${SHADERS_DIR}"
|
|
"${CMAKE_CURRENT_BINARY_DIR}/${SHADERS_DIR}"
|
|
)
|
|
create_glslc_shader_target(glsl_shaders
|
|
"${SHADERS_DIR}"
|
|
"${CMAKE_CURRENT_BINARY_DIR}/${SHADERS_DIR}"
|
|
)
|
|
|
|
|
|
add_subdirectory(examples/shared)
|
|
|
|
add_subdirectory(examples/basicGLFWWindow)
|
|
add_subdirectory(examples/logging)
|
|
add_subdirectory(examples/createContext)
|