quark/CMakeLists.txt

35 lines
888 B
CMake
Raw Permalink Normal View History

2025-01-03 13:48:36 +00:00
cmake_minimum_required(VERSION 3.24)
2025-01-03 09:21:31 +00:00
project(quark)
2025-01-03 15:13:34 +00:00
set(CMAKE_CXX_STANDARD 20)
2025-01-03 13:48:36 +00:00
include(FetchContent)
set(SPDLOG_BUILD_SHARED ON CACHE INTERNAL "")
FetchContent_Declare(
spdlog
GIT_REPOSITORY https://github.com/gabime/spdlog
GIT_TAG 8e5613379f5140fefb0b60412fbf1f5406e7c7f8
FIND_PACKAGE_ARGS
)
2025-01-03 18:00:43 +00:00
set(GLFW_LIBRARY_TYPE "SHARED" CACHE INTERNAL "")
FetchContent_Declare(
glfw3
GIT_REPOSITORY https://github.com/glfw/glfw
GIT_TAG 21fea01161e0d6b70c0c5c1f52dc8e7a7df14a50
FIND_PACKAGE_ARGS
)
2025-01-07 20:14:59 +00:00
# TODO: compile with all rendering backends and select one at runtime
set(QUARK_RENDERING_BACKEND "OPENGL" CACHE STRING "Rendering backend to use during engine compilation")
set_property(CACHE QUARK_RENDERING_BACKEND PROPERTY STRINGS OPENGL VULKAN)
if (${QUARK_RENDERING_BACKEND} STREQUAL "VULKAN")
find_package(Vulkan REQUIRED)
endif()
2025-01-03 09:21:31 +00:00
add_subdirectory(quark)
add_subdirectory(sandbox)