aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Pastor <dg0yt@darc.de>2024-06-23 20:58:36 +0200
committerGitHub <noreply@github.com>2024-06-23 21:58:36 +0300
commita28dde40b5b85c97b2eefee63db62ac49e46ca0c (patch)
tree4ed4bc378800a7c000eac65d3017d8e9e9ad8ec1
parent9be6e653d49957c974af2c171257cbaf942abbb9 (diff)
downloadmeson-a28dde40b5b85c97b2eefee63db62ac49e46ca0c.zip
meson-a28dde40b5b85c97b2eefee63db62ac49e46ca0c.tar.gz
meson-a28dde40b5b85c97b2eefee63db62ac49e46ca0c.tar.bz2
Recast CMake's IMPORTED_LOCATION into framework flags (#13299)
* Explicitly look for 'OpenAL' with method: 'cmake' This test was added for testing cmake depenencies, so no other method must be accepted here, and the spelling must match FindOpenAL.cmake. * Resolve frameworks in IMPORTED_LOCATION The IMPORTED_LOCATION property of CMake targets may contain macOS framework paths. These must be processed into flags. By putting the values in the list of targets, they will be processed as if they appeared in INTERFACE_LINK_LIBRARIES.
-rw-r--r--mesonbuild/cmake/tracetargets.py4
-rw-r--r--test cases/osx/9 framework recasting/meson.build2
2 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/cmake/tracetargets.py b/mesonbuild/cmake/tracetargets.py
index aee67ea..5a9d352 100644
--- a/mesonbuild/cmake/tracetargets.py
+++ b/mesonbuild/cmake/tracetargets.py
@@ -137,9 +137,9 @@ def resolve_cmake_trace_targets(target_name: str,
elif 'IMPORTED_IMPLIB' in tgt.properties:
res.libraries += [x for x in tgt.properties['IMPORTED_IMPLIB'] if x]
elif f'IMPORTED_LOCATION_{cfg}' in tgt.properties:
- res.libraries += [x for x in tgt.properties[f'IMPORTED_LOCATION_{cfg}'] if x]
+ targets += [x for x in tgt.properties[f'IMPORTED_LOCATION_{cfg}'] if x]
elif 'IMPORTED_LOCATION' in tgt.properties:
- res.libraries += [x for x in tgt.properties['IMPORTED_LOCATION'] if x]
+ targets += [x for x in tgt.properties['IMPORTED_LOCATION'] if x]
if 'LINK_LIBRARIES' in tgt.properties:
targets += [x for x in tgt.properties['LINK_LIBRARIES'] if x]
diff --git a/test cases/osx/9 framework recasting/meson.build b/test cases/osx/9 framework recasting/meson.build
index 2b15843..83fe19e 100644
--- a/test cases/osx/9 framework recasting/meson.build
+++ b/test cases/osx/9 framework recasting/meson.build
@@ -1,5 +1,5 @@
project('framework recasting', 'c', 'cpp')
-x = dependency('OpenAL')
+x = dependency('OpenAL', method: 'cmake')
y = executable('tt', files('main.cpp'), dependencies: x)