From 6c2860a4ecd69f95f6573b8917d77bbcea203669 Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Sat, 20 Aug 2022 11:27:53 +0200 Subject: [PATCH] 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. --- cmake/Modules/ObsHelpers_macOS.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/Modules/ObsHelpers_macOS.cmake b/cmake/Modules/ObsHelpers_macOS.cmake index 81e4ac6ed..4311c39f4 100644 --- a/cmake/Modules/ObsHelpers_macOS.cmake +++ b/cmake/Modules/ObsHelpers_macOS.cmake @@ -51,6 +51,8 @@ function(setup_framework_target target) FRAMEWORK DESTINATION "Frameworks" COMPONENT obs_libraries EXCLUDE_FROM_ALL + INCLUDES + DESTINATION Frameworks/$.framework/Headers PUBLIC_HEADER DESTINATION Frameworks/$.framework/Headers