mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Use target_sources for INTERFACE libraries to be compatible with older CMake versions.
This commit is contained in:
parent
7b8f30221a
commit
86c208b5e4
@ -115,7 +115,8 @@ function( vulkan_hpp__setup_library )
|
|||||||
vulkan_hpp__setup_project( NAME ${TARGET_NAME} )
|
vulkan_hpp__setup_project( NAME ${TARGET_NAME} )
|
||||||
|
|
||||||
if( "${TARGET_SOURCES}" STREQUAL "" )
|
if( "${TARGET_SOURCES}" STREQUAL "" )
|
||||||
add_library( ${TARGET_NAME} INTERFACE ${TARGET_HEADERS} )
|
add_library( ${TARGET_NAME} INTERFACE )
|
||||||
|
target_sources( ${TARGET_NAME} PUBLIC ${TARGET_HEADERS} )
|
||||||
else()
|
else()
|
||||||
if( ${TARGET_SHARED} )
|
if( ${TARGET_SHARED} )
|
||||||
add_library( ${TARGET_NAME} SHARED ${TARGET_SOURCES} ${TARGET_HEADERS} )
|
add_library( ${TARGET_NAME} SHARED ${TARGET_SOURCES} ${TARGET_HEADERS} )
|
||||||
|
Loading…
Reference in New Issue
Block a user