)]}' { "commit": "c80ddef7a4ce21ace9e3ca0fd190d320cc8cdaeb", "tree": "74f070196b824a9d6db4ab1a1e453253d74c4dff", "parents": [ "d3a1f899ee6060469fb8b28e325d1c2759fcc76c" ], "author": { "name": "DRC", "email": "information@libjpeg-turbo.org", "time": "Fri Mar 23 23:17:08 2018 -0500" }, "committer": { "name": "DRC", "email": "information@libjpeg-turbo.org", "time": "Fri Mar 23 23:45:44 2018 -0500" }, "message": "Build: Fix rpath in iOS shared libraries\n\nWhen attempting to configure an iOS/ARM build with Xcode 7.2 and CMake\n2.8.12, I got the following errors:\n\nCMake Error at CMakeLists.txt:560 (add_library):\n Attempting to use MACOSX_RPATH without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG\n being set. This could be because you are using a Mac OS X version less\n than 10.5 or because CMake\u0027s platform configuration is corrupt.\n(x 3)\n\nCMake Error at sharedlib/CMakeLists.txt:38 (add_library):\n Attempting to use MACOSX_RPATH without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG\n being set. This could be because you are using a Mac OS X version less\n than 10.5 or because CMake\u0027s platform configuration is corrupt.\n(x 3)\n\nUpgrading to CMake 3.x (tried 3.0 and 3.1) got rid of the errors, but\nthe resulting shared libs still did not use @rpath as expected. Note\nalso that CMake 3.x (at least the two versions I tested) does not\nautomatically set the MACOSX_RPATH property as claimed. I could find\nnothing in the release notes for later CMake releases to indicate that\neither problem has been fixed. What I did find was this little nugget\nof code in the Darwin platform module:\n\nhttps://github.com/Kitware/CMake/blob/f6b93fbf3ae00a9157af2f6497bed074d585cea9/Modules/Platform/Darwin.cmake#L33-L36\n\nThis sets CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG\u003d\"-Wl,-rpath,\" only if you\nare running OS X 10.5 or later. It makes no such check for iOS, perhaps\nbecause shared libraries aren\u0027t much of a thing with iOS apps. In any\nevent, this commit simply sets CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG if it\nisn\u0027t set already, and that fixes all of the aforementioned problems.\n", "tree_diff": [ { "type": "modify", "old_id": "5dfd5d70d807c87cf2b1917d8888567ed625f080", "old_mode": 33188, "old_path": "CMakeLists.txt", "new_id": "cc548f5ad1322451dba2bd8350f2c292fa12e11e", "new_mode": 33188, "new_path": "CMakeLists.txt" }, { "type": "modify", "old_id": "95aed252cc9fd3e4dbb998156d7381e805e63075", "old_mode": 33261, "old_path": "sharedlib/CMakeLists.txt", "new_id": "2d601701dcca7c389246b4aaf3ba2636982f806b", "new_mode": 33261, "new_path": "sharedlib/CMakeLists.txt" } ] }