1
0
Эх сурвалжийг харах

cmake: Fix missing interface include directory on Framework export

For exported targets `INCLUDES DESTINATION` behaves in a specific way
when running `install`: It sets the `INTERFACE_INCLUDE_DIRECTORY` for
the target (relative to the `INSTALL_PREFIX` when a relative path is
given).

This is not implicitly done by CMake, which resulted in the exported
libobs Framework to miss the variable and as such targets linking to
libobs were not able to find the necessary headers anymore.
PatTheMav 3 жил өмнө
parent
commit
6c2860a4ec

+ 2 - 0
cmake/Modules/ObsHelpers_macOS.cmake

@@ -51,6 +51,8 @@ function(setup_framework_target target)
     FRAMEWORK DESTINATION "Frameworks"
     FRAMEWORK DESTINATION "Frameworks"
               COMPONENT obs_libraries
               COMPONENT obs_libraries
               EXCLUDE_FROM_ALL
               EXCLUDE_FROM_ALL
+    INCLUDES
+    DESTINATION Frameworks/$<TARGET_FILE_BASE_NAME:${target}>.framework/Headers
     PUBLIC_HEADER
     PUBLIC_HEADER
       DESTINATION
       DESTINATION
         Frameworks/$<TARGET_FILE_BASE_NAME:${target}>.framework/Headers
         Frameworks/$<TARGET_FILE_BASE_NAME:${target}>.framework/Headers