File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,13 @@ def _configure_autotools(self):
100
100
def _patch_sources (self ):
101
101
for patch in self .conan_data .get ("patches" , {}).get (self .version , []):
102
102
tools .patch (** patch )
103
+ # Fix rpath in LC_ID_DYLIB of installed shared libs on macOS
104
+ if tools .is_apple_os (self .settings .os ):
105
+ tools .replace_in_file (
106
+ os .path .join (self ._source_subfolder , "configure" ),
107
+ "-install_name \\ $rpath/" ,
108
+ "-install_name @rpath/" ,
109
+ )
103
110
104
111
def build (self ):
105
112
self ._patch_sources ()
Original file line number Diff line number Diff line change @@ -11,6 +11,16 @@ def _test_transupp(self):
11
11
# transupp+libjpeg makes use of stdio of the C library. This cannot be used when using a dll libjpeg, built with a static c library.
12
12
return not (self .options ["libjpeg" ].shared and self .settings .compiler == "Visual Studio" and "MT" in self .settings .compiler .runtime )
13
13
14
+ def build_requirements (self ):
15
+ if hasattr (self , "settings_build" ) and tools .cross_building (self ) and \
16
+ self .settings .os == "Macos" and self .settings .arch == "armv8" :
17
+ # Workaround for CMake bug with error message:
18
+ # Attempting to use @rpath without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being
19
+ # set. This could be because you are using a Mac OS X version less than 10.5
20
+ # or because CMake's platform configuration is corrupt.
21
+ # FIXME: Remove once CMake on macOS/M1 CI runners is upgraded.
22
+ self .build_requires ("cmake/3.22.0" )
23
+
14
24
def build (self ):
15
25
cmake = CMake (self )
16
26
cmake .configure ()
You can’t perform that action at this time.
0 commit comments