2022-04-11 23:11:33 -04:00
|
|
|
find_package(Vulkan REQUIRED)
|
|
|
|
|
2022-04-12 02:06:16 -04:00
|
|
|
FetchContent_Declare(
|
|
|
|
glm
|
|
|
|
GIT_REPOSITORY https://github.com/g-truc/glm.git
|
|
|
|
GIT_TAG 0.9.9.8
|
|
|
|
)
|
|
|
|
|
|
|
|
FetchContent_MakeAvailable(glm)
|
|
|
|
|
2022-04-12 16:19:06 -04:00
|
|
|
if(USE_STANDALONE_WINDOW)
|
|
|
|
find_package(SDL2 REQUIRED)
|
|
|
|
set(EXTRA_SRC src/standalonewindow.cpp)
|
|
|
|
set(EXTRA_LIBRARIES SDL2::SDL2)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_library(renderer src/renderer.cpp ${EXTRA_SRC})
|
2022-04-11 23:11:33 -04:00
|
|
|
target_include_directories(renderer PUBLIC include)
|
2022-04-12 16:19:06 -04:00
|
|
|
target_link_libraries(renderer PUBLIC Vulkan::Vulkan fmt::fmt libxiv glm::glm ${EXTRA_LIBRARIES})
|
|
|
|
|
|
|
|
if(USE_STANDALONE_WINDOW)
|
|
|
|
target_compile_definitions(renderer PUBLIC USE_STANDALONE_WINDOW)
|
|
|
|
endif()
|