summaryrefslogtreecommitdiff
path: root/absl/time
diff options
context:
space:
mode:
authorGravatar Daniel Schürmann <daschuer@mixxx.org>2023-07-31 12:46:00 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-07-31 12:46:41 -0700
commit4b6e59a96304c9a44e186295bffa8a890adb8762 (patch)
tree1a4396e0163ed1bbe5673c299af54e9185057c25 /absl/time
parentd3ddfaa1e5fa9adb017a3bc0cd87171741985613 (diff)
PR #1495: CMake: Link CoreFoundation with -framework
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1495 This fixes https://github.com/abseil/abseil-cpp/issues/1494 With CMake 3.24 we can also use `$<LINK_LIBRARY:FRAMEWORK,CoreFoundation>` but abseil is still at CMake 3.10 The change has been tested here: https://github.com/daschuer/vcpkg/actions/runs/5670741925 Merge f3ff6bc01ff45970d2b803ca51421483b423b72b into c9c0fd5185067208e1cc4227d16122571762af39 Merging this change closes #1495 COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1495 from daschuer:framework-link-fix f3ff6bc01ff45970d2b803ca51421483b423b72b PiperOrigin-RevId: 552564485 Change-Id: I57b580e5795c54865576110e56220128d8b603b8
Diffstat (limited to 'absl/time')
-rw-r--r--absl/time/CMakeLists.txt8
1 files changed, 3 insertions, 5 deletions
diff --git a/absl/time/CMakeLists.txt b/absl/time/CMakeLists.txt
index 1c830c7a..e1ade7a3 100644
--- a/absl/time/CMakeLists.txt
+++ b/absl/time/CMakeLists.txt
@@ -54,10 +54,6 @@ absl_cc_library(
${ABSL_DEFAULT_COPTS}
)
-if(APPLE)
- find_library(CoreFoundation CoreFoundation)
-endif()
-
absl_cc_library(
NAME
time_zone
@@ -85,7 +81,9 @@ absl_cc_library(
${ABSL_DEFAULT_COPTS}
DEPS
Threads::Threads
- $<$<PLATFORM_ID:Darwin>:${CoreFoundation}>
+ # TODO(#1495): Use $<LINK_LIBRARY:FRAMEWORK,CoreFoundation> once our
+ # minimum CMake version >= 3.24
+ $<$<PLATFORM_ID:Darwin>:-Wl,-framework,CoreFoundation>
)
# Internal-only target, do not depend on directly.