mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-11-22 12:20:05 +00:00
Improve consistency in naming of targets and options
This commit is contained in:
parent
696ecd674d
commit
e65c1469d9
@ -4,9 +4,9 @@ project(VulkanMemoryAllocator)
|
||||
|
||||
find_package(Vulkan REQUIRED)
|
||||
|
||||
# VulkanMemoryAllocator contains an example application and VmaReplay which are not build by default
|
||||
option(VMA_BUILD_EXAMPLE_APP "Build VulkanMemoryAllocator example application" OFF)
|
||||
option(VMA_BUILD_EXAMPLE_APP_SHADERS "Build VulkanMemoryAllocator example application's shaders" OFF)
|
||||
option(VMA_BUILD_REPLAY_APP "Build VulkanMemoryAllocator replay application" OFF)
|
||||
# VulkanMemoryAllocator contains an sample application and VmaReplay which are not build by default
|
||||
option(VMA_BUILD_SAMPLE "Build VulkanMemoryAllocator sample application" OFF)
|
||||
option(VMA_BUILD_SAMPLE_SHADERS "Build VulkanMemoryAllocator sample application's shaders" OFF)
|
||||
option(VMA_BUILD_REPLAY "Build VulkanMemoryAllocator replay application" OFF)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
@ -111,9 +111,9 @@ The following CMake options are available
|
||||
|
||||
| Target | Description | CMake option | Default setting |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| VmaExample | VMA example application | `VMA_BUILD_EXAMPLE_APP` | `OFF` |
|
||||
| VmaBuildExampleShaders | Shaders for VmaExample | `VMA_BUILD_EXAMPLE_APP_SHADERS` | `OFF` |
|
||||
| VmaReplay | Replay tool for VMA .csv trace files | `VMA_BUILD_REPLAY_APP` | `OFF` |
|
||||
| VmaExample | VMA example application | `VMA_BUILD_SAMPLE` | `OFF` |
|
||||
| VmaBuildExampleShaders | Shaders for VmaExample | `VMA_BUILD_SAMPLE_SHADERS` | `OFF` |
|
||||
| VmaReplay | Replay tool for VMA .csv trace files | `VMA_BUILD_REPLAY` | `OFF` |
|
||||
|
||||
Please note that while VulkanMemoryAllocator library is supported on other platforms besides Windows, VmaExample and VmaReplay are not.
|
||||
|
||||
|
@ -22,37 +22,37 @@ target_link_libraries(
|
||||
Vulkan::Vulkan
|
||||
)
|
||||
|
||||
if (VMA_BUILD_EXAMPLE_APP)
|
||||
if (VMA_BUILD_SAMPLE)
|
||||
if(WIN32)
|
||||
set(VMA_EXAMPLE_SOURCE_FILES
|
||||
set(VMA_SAMPLE_SOURCE_FILES
|
||||
Common.cpp
|
||||
SparseBindingTest.cpp
|
||||
Tests.cpp
|
||||
VulkanSample.cpp
|
||||
)
|
||||
|
||||
add_executable(VmaExample ${VMA_EXAMPLE_SOURCE_FILES})
|
||||
add_executable(VmaSample ${VMA_SAMPLE_SOURCE_FILES})
|
||||
|
||||
# Visual Studio specific settings
|
||||
if(${CMAKE_GENERATOR} MATCHES "Visual Studio.*")
|
||||
# Use Unicode instead of multibyte set
|
||||
add_compile_definitions(UNICODE _UNICODE)
|
||||
|
||||
# Set VmaExample as startup project
|
||||
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT "VmaExample")
|
||||
# Set VmaSample as startup project
|
||||
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT "VmaSample")
|
||||
|
||||
# Enable multithreaded compiling
|
||||
target_compile_options(VmaExample PRIVATE "/MP")
|
||||
target_compile_options(VmaSample PRIVATE "/MP")
|
||||
|
||||
# Set working directory for Visual Studio debugger
|
||||
set_target_properties(
|
||||
VmaExample
|
||||
VmaSample
|
||||
PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/bin"
|
||||
)
|
||||
endif()
|
||||
|
||||
set_target_properties(
|
||||
VmaExample PROPERTIES
|
||||
VmaSample PROPERTIES
|
||||
|
||||
CXX_EXTENSIONS OFF
|
||||
# Use C++14
|
||||
@ -61,21 +61,21 @@ if (VMA_BUILD_EXAMPLE_APP)
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
VmaExample
|
||||
VmaSample
|
||||
|
||||
PRIVATE
|
||||
VulkanMemoryAllocator
|
||||
Vulkan::Vulkan
|
||||
)
|
||||
else()
|
||||
message(STATUS "VmaExample application is not supported to Linux")
|
||||
message(STATUS "VmaSample application is not supported to Linux")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(VMA_BUILD_EXAMPLE_APP_SHADERS)
|
||||
if(VMA_BUILD_SAMPLE_SHADERS)
|
||||
add_subdirectory(Shaders)
|
||||
endif()
|
||||
|
||||
if(VMA_BUILD_REPLAY_APP)
|
||||
if(VMA_BUILD_REPLAY)
|
||||
add_subdirectory(VmaReplay)
|
||||
endif()
|
||||
|
@ -1,4 +1,4 @@
|
||||
# This file will only be executed if VMA_BUILD_EXAMPLE_APP_SHADERS is set to ON
|
||||
# This file will only be executed if VMA_BUILD_SAMPLE_SHADERS is set to ON
|
||||
|
||||
find_program(GLSL_VALIDATOR glslangValidator REQUIRED)
|
||||
|
||||
@ -29,4 +29,4 @@ foreach(SHADER ${SHADERS})
|
||||
list(APPEND SPIRV_FILES ${SPIRV})
|
||||
endforeach()
|
||||
|
||||
add_custom_target(VmaExampleAppShaders ALL DEPENDS ${SPIRV_FILES})
|
||||
add_custom_target(VmaSampleShaders ALL DEPENDS ${SPIRV_FILES})
|
||||
|
@ -1,4 +1,4 @@
|
||||
# This file will only be executed if VMA_BUILD_REPLAY_APP is set to ON
|
||||
# This file will only be executed if VMA_BUILD_REPLAY is set to ON
|
||||
|
||||
if (WIN32)
|
||||
set(VMA_REPLAY_SOURCE_FILES
|
||||
@ -8,10 +8,10 @@ if (WIN32)
|
||||
VmaUsage.cpp
|
||||
)
|
||||
|
||||
add_executable(VmaReplayApp ${VMA_REPLAY_SOURCE_FILES})
|
||||
add_executable(VmaReplay ${VMA_REPLAY_SOURCE_FILES})
|
||||
|
||||
target_link_libraries(
|
||||
VmaReplayApp
|
||||
VmaReplay
|
||||
|
||||
PRIVATE
|
||||
Vulkan::Vulkan
|
||||
|
Loading…
Reference in New Issue
Block a user