Use CMake provided library names on macOS

The ${CMAKE_DL_LIBS} and Threads::Threads provides generic mechanisms to
use the dynamic linker and threading libraries on the system. In addition,
this commit replaces Vulkan::Headers with loader_specific_commits for the
vulkan-framework target. Note that this commit is in a series of commits and
not intended to work standalone.
This commit is contained in:
Charles Giessen
2021-11-03 15:09:32 -06:00
committed by Charles Giessen
parent 08b10ccae1
commit fdecf4d4aa
+2 -2
View File
@@ -315,8 +315,8 @@ else()
add_library(vulkan-framework SHARED ${NORMAL_LOADER_SRCS} ${OPT_LOADER_SRCS} ${FRAMEWORK_HEADERS})
endif()
add_dependencies(vulkan-framework loader_asm_gen_files)
target_link_libraries(vulkan-framework -ldl -lpthread -lm "-framework CoreFoundation")
target_link_libraries(vulkan-framework Vulkan::Headers)
target_link_libraries(vulkan-framework ${CMAKE_DL_LIBS} Threads::Threads -lm "-framework CoreFoundation")
target_link_libraries(vulkan-framework loader_specific_options)
# The FRAMEWORK_VERSION needs to be "A" here so that Xcode code-signing works when a user adds their framework to an Xcode
# project and does "Sign on Copy". It would have been nicer to use "1" to denote Vulkan 1. Although Apple docs say that a