Improve consistency in naming of targets and options
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c668e34..29e0260 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,9 +4,9 @@
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)
diff --git a/README.md b/README.md
index 4bf99dc..58bc1c3 100644
--- a/README.md
+++ b/README.md
@@ -111,9 +111,9 @@
| 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.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d23bddf..ac465b9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -22,37 +22,37 @@
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 @@
)
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()
diff --git a/src/Shaders/CMakeLists.txt b/src/Shaders/CMakeLists.txt
index 990b05a..f85ab78 100644
--- a/src/Shaders/CMakeLists.txt
+++ b/src/Shaders/CMakeLists.txt
@@ -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 @@
list(APPEND SPIRV_FILES ${SPIRV})
endforeach()
-add_custom_target(VmaExampleAppShaders ALL DEPENDS ${SPIRV_FILES})
+add_custom_target(VmaSampleShaders ALL DEPENDS ${SPIRV_FILES})
diff --git a/src/VmaReplay/CMakeLists.txt b/src/VmaReplay/CMakeLists.txt
index 0af9f99..1583b23 100644
--- a/src/VmaReplay/CMakeLists.txt
+++ b/src/VmaReplay/CMakeLists.txt
@@ -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 @@
VmaUsage.cpp
)
- add_executable(VmaReplayApp ${VMA_REPLAY_SOURCE_FILES})
+ add_executable(VmaReplay ${VMA_REPLAY_SOURCE_FILES})
target_link_libraries(
- VmaReplayApp
+ VmaReplay
PRIVATE
Vulkan::Vulkan