1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-24 21:07:46 +00:00
novus/renderer/CMakeLists.txt
Joshua Goins 0f75e9730c armoury: Embed shaders, skeletons (for now) to allow it to run
Previously you needed the secret sauce of shader files and skeleton
files from TexTools in the same directory, now this is all embedded in
the application.
2023-10-10 17:16:11 -04:00

29 lines
No EOL
951 B
CMake

# SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
# SPDX-License-Identifier: CC0-1.0
if(USE_STANDALONE_WINDOW)
find_package(SDL2 REQUIRED)
set(EXTRA_SRC src/standalonewindow.cpp)
set(EXTRA_LIBRARIES SDL2::SDL2)
endif()
add_library(renderer STATIC)
target_sources(renderer PRIVATE
src/renderer.cpp
src/imguipass.cpp
src/imguipass.h
${EXTRA_SRC})
qt_add_resources(renderer "shaders"
PREFIX "/"
FILES
shaders/imgui.frag.spv
shaders/imgui.vert.spv
shaders/mesh.frag.spv
shaders/mesh.vert.spv)
target_include_directories(renderer PUBLIC include)
target_link_libraries(renderer PUBLIC Qt6::Core Vulkan::Vulkan physis z glm::glm imgui ${EXTRA_LIBRARIES})
target_compile_definitions(renderer PUBLIC GLM_FORCE_RADIANS GLM_FORCE_DEPTH_ZERO_TO_ONE)
if(USE_STANDALONE_WINDOW)
target_compile_definitions(renderer PUBLIC USE_STANDALONE_WINDOW)
endif()