mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2025-08-05 12:27:47 -04:00
Remove outdated flag VULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC (#2229)
This commit is contained in:
parent
167bb6afe0
commit
cc01933661
@ -42,7 +42,6 @@ option( VULKAN_HPP_RUN_GENERATOR "Run the HPP generator" OFF )
|
|||||||
option( VULKAN_HPP_GENERATOR_BUILD "Build the HPP generator" ${PROJECT_IS_TOP_LEVEL} )
|
option( VULKAN_HPP_GENERATOR_BUILD "Build the HPP generator" ${PROJECT_IS_TOP_LEVEL} )
|
||||||
option( VULKAN_HPP_SAMPLES_BUILD "Build samples" OFF )
|
option( VULKAN_HPP_SAMPLES_BUILD "Build samples" OFF )
|
||||||
option( VULKAN_HPP_TESTS_BUILD "Build tests" OFF )
|
option( VULKAN_HPP_TESTS_BUILD "Build tests" OFF )
|
||||||
option( VULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC "Build only dynamic. Required in case the Vulkan SDK is not available" OFF )
|
|
||||||
option( VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP "Build with local Vulkan headers" ON )
|
option( VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP "Build with local Vulkan headers" ON )
|
||||||
option( VULKAN_HPP_ENABLE_CPP20_MODULES "Build Vulkan-Hpp as C++20 module; requires minimum CMake version 3.28" OFF )
|
option( VULKAN_HPP_ENABLE_CPP20_MODULES "Build Vulkan-Hpp as C++20 module; requires minimum CMake version 3.28" OFF )
|
||||||
option( VULKAN_HPP_ENABLE_STD_MODULE "Build Vulkan-Hpp with import std; requires minimum CMake version 3.30" OFF )
|
option( VULKAN_HPP_ENABLE_STD_MODULE "Build Vulkan-Hpp with import std; requires minimum CMake version 3.30" OFF )
|
||||||
@ -424,7 +423,7 @@ function( vulkan_hpp__setup_sample )
|
|||||||
set( multiValueArgs HEADERS LIBS PCH SOURCES )
|
set( multiValueArgs HEADERS LIBS PCH SOURCES )
|
||||||
cmake_parse_arguments( TARGET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
cmake_parse_arguments( TARGET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
||||||
|
|
||||||
if( NOT (VULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC AND VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP) )
|
if( NOT VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP )
|
||||||
find_package( Vulkan REQUIRED )
|
find_package( Vulkan REQUIRED )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -461,22 +460,20 @@ function( vulkan_hpp__setup_sample_static )
|
|||||||
set( multiValueArgs )
|
set( multiValueArgs )
|
||||||
cmake_parse_arguments( TARGET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
cmake_parse_arguments( TARGET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
||||||
|
|
||||||
if( NOT VULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC )
|
if( NOT TARGET_NAME )
|
||||||
if( NOT TARGET_NAME )
|
message( FATAL_ERROR "NAME must be defined in vulkan_hpp__setup_sample_static" )
|
||||||
message( FATAL_ERROR "NAME must be defined in vulkan_hpp__setup_sample_static" )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package( Vulkan REQUIRED )
|
|
||||||
|
|
||||||
vulkan_hpp__setup_sample(
|
|
||||||
NAME ${TARGET_NAME}
|
|
||||||
FOLDER Samples
|
|
||||||
PCH <vulkan/vulkan.hpp>
|
|
||||||
SOURCES ${TARGET_NAME}.cpp
|
|
||||||
LIBS ${Vulkan_LIBRARIES} )
|
|
||||||
|
|
||||||
target_compile_definitions( ${TARGET_NAME} PUBLIC VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=0 )
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_package( Vulkan REQUIRED )
|
||||||
|
|
||||||
|
vulkan_hpp__setup_sample(
|
||||||
|
NAME ${TARGET_NAME}
|
||||||
|
FOLDER Samples
|
||||||
|
PCH <vulkan/vulkan.hpp>
|
||||||
|
SOURCES ${TARGET_NAME}.cpp
|
||||||
|
LIBS ${Vulkan_LIBRARIES} )
|
||||||
|
|
||||||
|
target_compile_definitions( ${TARGET_NAME} PUBLIC VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=0 )
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function( vulkan_hpp__setup_sample_dynamic )
|
function( vulkan_hpp__setup_sample_dynamic )
|
||||||
|
@ -12,4 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
vulkan_hpp__setup_sample_static( NAME 01_InitInstance )
|
find_package( Vulkan QUIET )
|
||||||
|
if ( Vulkan_FOUND )
|
||||||
|
vulkan_hpp__setup_sample_static( NAME 01_InitInstance )
|
||||||
|
endif()
|
||||||
|
@ -12,4 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
vulkan_hpp__setup_sample_static( NAME CreateDebugUtilsMessenger )
|
find_package( Vulkan QUIET )
|
||||||
|
if ( Vulkan_FOUND )
|
||||||
|
vulkan_hpp__setup_sample_static( NAME CreateDebugUtilsMessenger )
|
||||||
|
endif()
|
||||||
|
@ -12,4 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
vulkan_hpp__setup_sample_static( NAME InstanceExtensionProperties )
|
find_package( Vulkan QUIET )
|
||||||
|
if ( Vulkan_FOUND )
|
||||||
|
vulkan_hpp__setup_sample_static( NAME InstanceExtensionProperties )
|
||||||
|
endif()
|
||||||
|
@ -12,4 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
vulkan_hpp__setup_sample_static( NAME InstanceLayerExtensionProperties )
|
find_package( Vulkan QUIET )
|
||||||
|
if ( Vulkan_FOUND )
|
||||||
|
vulkan_hpp__setup_sample_static( NAME InstanceLayerExtensionProperties )
|
||||||
|
endif()
|
||||||
|
@ -12,4 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
vulkan_hpp__setup_sample_static( NAME InstanceLayerProperties )
|
find_package( Vulkan QUIET )
|
||||||
|
if ( Vulkan_FOUND )
|
||||||
|
vulkan_hpp__setup_sample_static( NAME InstanceLayerProperties )
|
||||||
|
endif()
|
||||||
|
@ -12,4 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
vulkan_hpp__setup_sample_static( NAME InstanceVersion )
|
find_package( Vulkan QUIET )
|
||||||
|
if ( Vulkan_FOUND )
|
||||||
|
vulkan_hpp__setup_sample_static( NAME InstanceVersion )
|
||||||
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user