mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-24 04:15:11 +00:00
cmake: Workaround for missing INTERFACE_INCLUDE_DIRECTORIES (MacOS)
This work-around adds the necessary include directories, as the 'libobs' target does not export any include directories visible without BUILD_INTERFACE evaluating to TRUE. Hopefully the true cause for this problem can be identified and fixed later.
This commit is contained in:
parent
1d066caed3
commit
9fbed3a319
1 changed files with 15 additions and 0 deletions
|
@ -684,6 +684,21 @@ elseif(NOT TARGET OBS::libobs)
|
|||
# Add the missing OBS::libobs alias target if possible.
|
||||
add_library(OBS::libobs ALIAS libobs)
|
||||
endif()
|
||||
if(D_PLATFORM_MAC)
|
||||
# We may need to reconstruct the include directories on MacOS.
|
||||
get_target_property(libobs_INTERFACE_INCLUDE_DIRECTORIES OBS::libobs INTERFACE_INCLUDE_DIRECTORIES)
|
||||
if("${libobs_INTERFACE_INCLUDE_DIRECTORIES}" STREQUAL "libobs_INTERFACE_INCLUDE_DIRECTORIES-NOTFOUND")
|
||||
get_target_property(libobs_IMPORTED_LOCATION_RELEASE OBS::libobs IMPORTED_LOCATION_RELEASE)
|
||||
get_filename_component(libobs_IMPORTED_LOCATION_RELEASE "${libobs_IMPORTED_LOCATION_RELEASE}" DIRECTORY)
|
||||
get_filename_component(libobs_IMPORTED_LOCATION_RELEASE "${libobs_IMPORTED_LOCATION_RELEASE}" DIRECTORY)
|
||||
get_filename_component(libobs_IMPORTED_LOCATION_RELEASE "${libobs_IMPORTED_LOCATION_RELEASE}" DIRECTORY)
|
||||
set(libobs_IMPORTED_LOCATION_RELEASE "${libobs_IMPORTED_LOCATION_RELEASE}/Headers")
|
||||
set_target_properties(OBS::libobs PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${libobs_IMPORTED_LOCATION_RELEASE}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#- OBS: Front-End API
|
||||
set(obs-frontend-api_FOUND OFF)
|
||||
|
|
Loading…
Reference in a new issue