Compare commits

...
2 Commits
Author SHA1 Message Date
Eric Miotto bcd9208428 [1.1.x] build: use cctols ranlib on Darwin (#130)
This complements the change in #105 and allows to build with a CMake
newer than 3.19.6.

Addresses rdar://99435188

(cherry picked from commit 7ba978bbd451e2f831f84a805c73393b331e0aa8)
2022-09-02 16:58:00 +01:00
Cory BenfieldandSaleem Abdulrasool ddb07e896a build: attempt to workaround linker issues on Darwin (#105) (#106)
The use of a non-cctools librarian causes ld64 some heartburn.
Explicitly opt into using the cctools librarian.

rdar://87850031
(cherry picked from commit facc82fbb4)

Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2022-02-25 17:51:00 +00:00
+6
View File
@@ -37,6 +37,12 @@ if(BUILD_SHARED_LIBS)
set(CMAKE_POSITION_INDEPENDENT_CODE YES)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL Darwin AND NOT CMAKE_CROSSCOMPILING)
set(CMAKE_AR "/usr/bin/ar")
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> crs <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_RANLIB "/usr/bin/ranlib")
endif()
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
find_package(dispatch CONFIG)
find_package(Foundation CONFIG)