Skip to content

Commit

Permalink
Drop linking Vulkan directly (#2000)
Browse files Browse the repository at this point in the history
The `vulkan-wrapper` helper library's purpose is to eliminate the need
to link targets directly to Vulkan, and load it dynamically instead at
runtime, using `dlopen` and `LoadLibrary`.

Remove the direct linking of the Vulkan library from targets that link
to `vulkan-wrapper`.

Fixes #1999

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
  • Loading branch information
ahesham-arm authored Jul 9, 2024
1 parent dd029ca commit 47546a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})

include_directories (${CLConform_INCLUDE_DIR})

# needed by Vulkan wrapper to link
if(WIN32)
list(APPEND CLConform_LIBRARIES vulkan-1 vulkan_wrapper)
else(WIN32)
list(APPEND CLConform_LIBRARIES vulkan dl vulkan_wrapper)
endif(WIN32)
list(APPEND CLConform_LIBRARIES vulkan_wrapper)
set(CMAKE_CXX_FLAGS "-fpermissive")

include_directories("../../common/vulkan_wrapper")
Expand Down
6 changes: 1 addition & 5 deletions test_conformance/vulkan/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
set (MODULE_NAME VULKAN)

if(WIN32)
list(APPEND CLConform_LIBRARIES vulkan-1 vulkan_wrapper)
else(WIN32)
list(APPEND CLConform_LIBRARIES vulkan dl vulkan_wrapper)
endif(WIN32)
list(APPEND CLConform_LIBRARIES vulkan_wrapper)
set(CMAKE_CXX_FLAGS "-fpermissive")
if(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_USE_PLATFORM_WIN32_KHR")
Expand Down

0 comments on commit 47546a5

Please sign in to comment.