2/13/2024 0 Comments Cmake install rpath![]() Some hint/warning in the documentation would have saved me a lot of time.A semicolon-separated list specifying the rpath to use in installed targets (for platforms that support it). As per the document, which says: CMAKEINSTALLRPATH¶ The rpath to use for installed targets. Or give an proper warning (or error) that code signing was invalidated. This is used to initialize the BUILDRPATH target property for all targets.Ideally CMake re-codesigns binaries post-install, if it altered the RPATH and code-signing was set up.If I did something completely wrong/in an odd way, teach me the right/proper way and show me where in the docs it is noted. ![]() Again I had to find a workaround by changing the RUNTIME_OUTPUT_DIRECTORY.Īll of this was a massive pain to figure out, so my wishes are: Now the binaries are not touched when installing and the code signing is valid.īut now executables from the build-dir won't run, because the install-RPATH doesn't work with build directory structure. ![]() To resolve this problem, I enabled the target property BUILD_WITH_INSTALL_RPATH. Otool -l install_dir/bin/my_exe | grep LC_RPATH -A2 Otool -l build-dir/Release/my_exe | grep LC_RPATH -A2 Inspecting their RPATHs, shows, that they got altered: However, when installing the results, the binaries get changed (a diff verifies this). The binaries in the build directory seem to be correctly signed since codesign -verify -deep -strict -verbose=2 build-dir/Release/my_exe prints both valid on disk and satisfies its Designated Requirement I've set up my project to code signing libs/executables by setting the target properties XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY and XCODE_ATTRIBUTE_DEVELOPMENT_TEAM.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |