File tree 1 file changed +13
-8
lines changed
1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -21,14 +21,19 @@ if(APPLE)
21
21
link_directories (AFTER "${BREW_PREFIX} /lib" )
22
22
set (ENV{PKG_CONFIG_PATH} "${BREW_PREFIX} /opt/libffi/lib/pkgconfig" )
23
23
24
- # Use LLD as the linker
25
- # This is necessary as the default linker used by CMake on macOS is
26
- # ld64, which currently has some incompatibilities with Homebrew and XCode15.
27
- # See: https://github.com/orgs/Homebrew/discussions/4794#discussioncomment-7044468
28
- # Adding this flag avoid the following errors:
29
- # ld: warning: duplicate -rpath ... ignored
30
- # ld: warning: ignoring duplicate libraries ...
31
- add_link_options ("-fuse-ld=lld" )
24
+ if (DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
25
+ message (STATUS "Building for macOS deployment target ${CMAKE_OSX_DEPLOYMENT_TARGET} " )
26
+ if (CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER_EQUAL "15" )
27
+ # Use LLD as the linker
28
+ # This is necessary as the default linker used by CMake on macOS is
29
+ # ld64, which currently has some incompatibilities with Homebrew and XCode15.
30
+ # See: https://github.com/orgs/Homebrew/discussions/4794#discussioncomment-7044468
31
+ # Adding this flag avoid the following errors:
32
+ # ld: warning: duplicate -rpath ... ignored
33
+ # ld: warning: ignoring duplicate libraries ...
34
+ add_link_options ("-fuse-ld=lld" )
35
+ endif ()
36
+ endif ()
32
37
33
38
endif () # USE_NIX
34
39
endif () # APPLE
You can’t perform that action at this time.
0 commit comments