2022-02-16 23:13:40 +00:00
|
|
|
add_library(aurora STATIC
|
|
|
|
lib/aurora.cpp
|
2022-02-19 05:33:56 +00:00
|
|
|
lib/gpu.cpp
|
2022-02-16 23:13:40 +00:00
|
|
|
lib/imgui.cpp
|
2022-02-19 14:36:03 +00:00
|
|
|
lib/input.cpp
|
2022-02-16 23:13:40 +00:00
|
|
|
lib/dawn/BackendBinding.cpp
|
|
|
|
lib/gfx/common.cpp
|
2022-02-18 00:38:31 +00:00
|
|
|
lib/gfx/texture.cpp
|
2022-03-05 03:36:54 +00:00
|
|
|
lib/gfx/stream.cpp
|
2022-03-06 07:46:42 +00:00
|
|
|
lib/gfx/gx.cpp
|
2022-03-06 20:58:06 +00:00
|
|
|
lib/gfx/gx_shader.cpp
|
2022-03-05 03:36:54 +00:00
|
|
|
lib/gfx/texture_convert.cpp
|
2022-02-18 00:38:31 +00:00
|
|
|
lib/gfx/movie_player/shader.cpp
|
2022-03-05 03:36:54 +00:00
|
|
|
lib/gfx/stream/shader.cpp
|
2022-03-06 20:58:06 +00:00
|
|
|
lib/gfx/model/shader.cpp
|
2022-02-16 23:13:40 +00:00
|
|
|
)
|
2022-02-17 06:03:00 +00:00
|
|
|
target_compile_definitions(aurora PRIVATE IMGUI_USER_CONFIG="imconfig_user.h") # IMGUI_USE_WCHAR32
|
2022-03-04 07:47:21 +00:00
|
|
|
target_include_directories(aurora PUBLIC include ../)
|
2022-02-16 05:21:24 +00:00
|
|
|
target_include_directories(aurora PRIVATE ../imgui ../extern/imgui)
|
2022-06-01 00:40:46 +00:00
|
|
|
if(NOT TARGET SDL2::SDL2-static)
|
|
|
|
find_package(SDL2 REQUIRED)
|
|
|
|
endif()
|
|
|
|
target_link_libraries(aurora PRIVATE dawn_native dawncpp webgpu_dawn zeus logvisor SDL2::SDL2-static xxhash
|
2022-03-15 06:18:45 +00:00
|
|
|
absl::btree absl::flat_hash_map)
|
2022-05-27 19:52:16 +00:00
|
|
|
if (DAWN_ENABLE_VULKAN)
|
|
|
|
target_compile_definitions(aurora PRIVATE DAWN_ENABLE_BACKEND_VULKAN)
|
|
|
|
target_sources(aurora PRIVATE lib/dawn/VulkanBinding.cpp)
|
|
|
|
endif ()
|
|
|
|
if (DAWN_ENABLE_METAL)
|
|
|
|
target_compile_definitions(aurora PRIVATE DAWN_ENABLE_BACKEND_METAL)
|
|
|
|
target_sources(aurora PRIVATE lib/dawn/MetalBinding.mm)
|
2022-02-16 23:13:40 +00:00
|
|
|
set_source_files_properties(lib/dawn/MetalBinding.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
|
2022-05-27 19:52:16 +00:00
|
|
|
endif ()
|
|
|
|
if (DAWN_ENABLE_D3D12)
|
|
|
|
target_compile_definitions(aurora PRIVATE DAWN_ENABLE_BACKEND_D3D12)
|
|
|
|
target_sources(aurora PRIVATE lib/dawn/D3D12Binding.cpp)
|
|
|
|
endif ()
|
|
|
|
if (DAWN_ENABLE_DESKTOP_GL)
|
2022-06-08 18:02:07 +00:00
|
|
|
target_compile_definitions(aurora PRIVATE DAWN_ENABLE_BACKEND_OPENGL DAWN_ENABLE_BACKEND_DESKTOP_GL)
|
2022-05-27 19:52:16 +00:00
|
|
|
target_sources(aurora PRIVATE lib/dawn/OpenGLBinding.cpp)
|
2022-02-16 23:13:40 +00:00
|
|
|
endif ()
|
2022-06-01 00:40:46 +00:00
|
|
|
if (DAWN_ENABLE_NULL)
|
|
|
|
target_compile_definitions(aurora PRIVATE DAWN_ENABLE_BACKEND_NULL)
|
|
|
|
target_sources(aurora PRIVATE lib/dawn/NullBinding.cpp)
|
|
|
|
endif ()
|