58 lines
1.6 KiB
CMake
58 lines
1.6 KiB
CMake
# CMakeList.txt ; CMake project for Aster Core
|
|
|
|
cmake_minimum_required(VERSION 3.13)
|
|
|
|
find_package(glm CONFIG REQUIRED)
|
|
find_package(SDL3 CONFIG REQUIRED)
|
|
find_path(SCOTTT_DEBUGBREAK_INCLUDE_DIRS "debugbreak.h")
|
|
find_package(Vulkan REQUIRED)
|
|
find_package(fmt CONFIG REQUIRED)
|
|
find_package(VulkanMemoryAllocator CONFIG REQUIRED)
|
|
find_package(EASTL CONFIG REQUIRED)
|
|
|
|
set(HEADER_FILES
|
|
"constants.h"
|
|
"config.h"
|
|
"logger.h"
|
|
"global.h"
|
|
"context.h"
|
|
"window.h"
|
|
"physical_device.h"
|
|
"device.h"
|
|
"swapchain.h"
|
|
"pipeline.h"
|
|
"queue_allocation.h"
|
|
"buffer.h"
|
|
"surface.h"
|
|
"size.h"
|
|
"timer.h")
|
|
|
|
set(SOURCE_FILES
|
|
"logger.cpp"
|
|
"global.cpp"
|
|
"context.cpp"
|
|
"window.cpp"
|
|
"physical_device.cpp"
|
|
"device.cpp"
|
|
"swapchain.cpp"
|
|
"pipeline.cpp"
|
|
"buffer.cpp"
|
|
"image.cpp"
|
|
"image.h"
|
|
"surface.cpp")
|
|
|
|
add_library(aster_core STATIC ${SOURCE_FILES} ${HEADER_FILES})
|
|
set_property(TARGET aster_core PROPERTY CXX_STANDARD 20)
|
|
|
|
target_precompile_headers(aster_core PUBLIC global.h)
|
|
|
|
target_include_directories(aster_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
target_link_libraries(aster_core PUBLIC glm::glm-header-only)
|
|
target_link_libraries(aster_core PRIVATE SDL3::SDL3)
|
|
target_include_directories(aster_core PRIVATE ${SCOTTT_DEBUGBREAK_INCLUDE_DIRS})
|
|
target_link_libraries(aster_core PRIVATE fmt::fmt)
|
|
target_link_libraries(aster_core PRIVATE EASTL)
|
|
target_link_libraries(aster_core PUBLIC Vulkan::Headers GPUOpen::VulkanMemoryAllocator)
|
|
|