40 lines
1.2 KiB
CMake
40 lines
1.2 KiB
CMake
find_package(Vulkan REQUIRED)
|
|
if (NOT Vulkan_FOUND)
|
|
error("Vulkan not found")
|
|
endif ()
|
|
|
|
#add_library(VulkanCppModule)
|
|
#add_library(Vulkan::cppm ALIAS VulkanCppModule)
|
|
#
|
|
#target_compile_definitions(VulkanCppModule PUBLIC
|
|
# VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1
|
|
# VULKAN_HPP_NO_STRUCT_CONSTRUCTORS=1
|
|
# VULKAN_HPP_NO_STD_MODULE=1
|
|
#)
|
|
#
|
|
#target_include_directories(VulkanCppModule PRIVATE "${Vulkan_INCLUDE_DIR}")
|
|
#
|
|
#target_link_libraries(VulkanCppModule PUBLIC Vulkan::Vulkan)
|
|
#
|
|
#target_sources(VulkanCppModule
|
|
# PUBLIC
|
|
# FILE_SET cxx_modules TYPE CXX_MODULES
|
|
# BASE_DIRS "${Vulkan_INCLUDE_DIR}"
|
|
# FILES "${Vulkan_INCLUDE_DIR}/vulkan/vulkan.cppm"
|
|
#)
|
|
#
|
|
#if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.28" AND VULKAN_HEADERS_ENABLE_MODULE AND COMPILER_SUPPORTS_CXX_MODULES)
|
|
# add_library(Vulkan-Module)
|
|
# add_library(Vulkan::VulkanHppModule ALIAS Vulkan-Module)
|
|
# target_sources(Vulkan-Module
|
|
# PUBLIC
|
|
# FILE_SET module
|
|
# TYPE CXX_MODULES
|
|
# BASE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include"
|
|
# FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/vulkan/vulkan.cppm"
|
|
# )
|
|
# target_compile_features(Vulkan-Module PUBLIC cxx_std_20)
|
|
# target_link_libraries(Vulkan-Module PUBLIC Vulkan-Headers)
|
|
#endif ()
|
|
|
|
message("Vulkan include: ${Vulkan_INCLUDE_DIR}") |