mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-11-05 04:10:06 +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)
|
find_package(Vulkan REQUIRED)
|
||||||
|
|
||||||
# VulkanMemoryAllocator contains an example application and VmaReplay which are not build by default
|
# VulkanMemoryAllocator contains an sample application and VmaReplay which are not build by default
|
||||||
option(VMA_BUILD_EXAMPLE_APP "Build VulkanMemoryAllocator example application" OFF)
|
option(VMA_BUILD_SAMPLE "Build VulkanMemoryAllocator sample application" OFF)
|
||||||
option(VMA_BUILD_EXAMPLE_APP_SHADERS "Build VulkanMemoryAllocator example application's shaders" OFF)
|
option(VMA_BUILD_SAMPLE_SHADERS "Build VulkanMemoryAllocator sample application's shaders" OFF)
|
||||||
option(VMA_BUILD_REPLAY_APP "Build VulkanMemoryAllocator replay application" OFF)
|
option(VMA_BUILD_REPLAY "Build VulkanMemoryAllocator replay application" OFF)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
@ -111,9 +111,9 @@ The following CMake options are available
|
|||||||
|
|
||||||
| Target | Description | CMake option | Default setting |
|
| Target | Description | CMake option | Default setting |
|
||||||
| ------------- | ------------- | ------------- | ------------- |
|
| ------------- | ------------- | ------------- | ------------- |
|
||||||
| VmaExample | VMA example application | `VMA_BUILD_EXAMPLE_APP` | `OFF` |
|
| VmaExample | VMA example application | `VMA_BUILD_SAMPLE` | `OFF` |
|
||||||
| VmaBuildExampleShaders | Shaders for VmaExample | `VMA_BUILD_EXAMPLE_APP_SHADERS` | `OFF` |
|
| VmaBuildExampleShaders | Shaders for VmaExample | `VMA_BUILD_SAMPLE_SHADERS` | `OFF` |
|
||||||
| VmaReplay | Replay tool for VMA .csv trace files | `VMA_BUILD_REPLAY_APP` | `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.
|
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
|
Vulkan::Vulkan
|
||||||
)
|
)
|
||||||
|
|
||||||
if (VMA_BUILD_EXAMPLE_APP)
|
if (VMA_BUILD_SAMPLE)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(VMA_EXAMPLE_SOURCE_FILES
|
set(VMA_SAMPLE_SOURCE_FILES
|
||||||
Common.cpp
|
Common.cpp
|
||||||
SparseBindingTest.cpp
|
SparseBindingTest.cpp
|
||||||
Tests.cpp
|
Tests.cpp
|
||||||
VulkanSample.cpp
|
VulkanSample.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(VmaExample ${VMA_EXAMPLE_SOURCE_FILES})
|
add_executable(VmaSample ${VMA_SAMPLE_SOURCE_FILES})
|
||||||
|
|
||||||
# Visual Studio specific settings
|
# Visual Studio specific settings
|
||||||
if(${CMAKE_GENERATOR} MATCHES "Visual Studio.*")
|
if(${CMAKE_GENERATOR} MATCHES "Visual Studio.*")
|
||||||
# Use Unicode instead of multibyte set
|
# Use Unicode instead of multibyte set
|
||||||
add_compile_definitions(UNICODE _UNICODE)
|
add_compile_definitions(UNICODE _UNICODE)
|
||||||
|
|
||||||
# Set VmaExample as startup project
|
# Set VmaSample as startup project
|
||||||
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT "VmaExample")
|
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT "VmaSample")
|
||||||
|
|
||||||
# Enable multithreaded compiling
|
# Enable multithreaded compiling
|
||||||
target_compile_options(VmaExample PRIVATE "/MP")
|
target_compile_options(VmaSample PRIVATE "/MP")
|
||||||
|
|
||||||
# Set working directory for Visual Studio debugger
|
# Set working directory for Visual Studio debugger
|
||||||
set_target_properties(
|
set_target_properties(
|
||||||
VmaExample
|
VmaSample
|
||||||
PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/bin"
|
PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/bin"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties(
|
set_target_properties(
|
||||||
VmaExample PROPERTIES
|
VmaSample PROPERTIES
|
||||||
|
|
||||||
CXX_EXTENSIONS OFF
|
CXX_EXTENSIONS OFF
|
||||||
# Use C++14
|
# Use C++14
|
||||||
@ -61,21 +61,21 @@ if (VMA_BUILD_EXAMPLE_APP)
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
VmaExample
|
VmaSample
|
||||||
|
|
||||||
PRIVATE
|
PRIVATE
|
||||||
VulkanMemoryAllocator
|
VulkanMemoryAllocator
|
||||||
Vulkan::Vulkan
|
Vulkan::Vulkan
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
message(STATUS "VmaExample application is not supported to Linux")
|
message(STATUS "VmaSample application is not supported to Linux")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(VMA_BUILD_EXAMPLE_APP_SHADERS)
|
if(VMA_BUILD_SAMPLE_SHADERS)
|
||||||
add_subdirectory(Shaders)
|
add_subdirectory(Shaders)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(VMA_BUILD_REPLAY_APP)
|
if(VMA_BUILD_REPLAY)
|
||||||
add_subdirectory(VmaReplay)
|
add_subdirectory(VmaReplay)
|
||||||
endif()
|
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)
|
find_program(GLSL_VALIDATOR glslangValidator REQUIRED)
|
||||||
|
|
||||||
@ -29,4 +29,4 @@ foreach(SHADER ${SHADERS})
|
|||||||
list(APPEND SPIRV_FILES ${SPIRV})
|
list(APPEND SPIRV_FILES ${SPIRV})
|
||||||
endforeach()
|
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)
|
if (WIN32)
|
||||||
set(VMA_REPLAY_SOURCE_FILES
|
set(VMA_REPLAY_SOURCE_FILES
|
||||||
@ -8,10 +8,10 @@ if (WIN32)
|
|||||||
VmaUsage.cpp
|
VmaUsage.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(VmaReplayApp ${VMA_REPLAY_SOURCE_FILES})
|
add_executable(VmaReplay ${VMA_REPLAY_SOURCE_FILES})
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
VmaReplayApp
|
VmaReplay
|
||||||
|
|
||||||
PRIVATE
|
PRIVATE
|
||||||
Vulkan::Vulkan
|
Vulkan::Vulkan
|
||||||
|
Loading…
Reference in New Issue
Block a user