diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-07-15 16:04:57 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-07-15 23:05:26 +0000 |
commit | 4a39706272a59d43530e038f8b20436e2c3052ce (patch) | |
tree | 45f6557b430c4535de602d0f6ac460026d11b449 /CMakeLists.txt | |
parent | 85f8a99f354850d5fbf774b04e9721195614d7d8 (diff) | |
download | wireshark-4a39706272a59d43530e038f8b20436e2c3052ce.tar.gz |
On OS X, add the Qt -Wl,-rpath hack in CMake, as we do with autotools.
Change-Id: I281e1bf790b7eefbbd43a3406622262cfe8b36df
Reviewed-on: https://code.wireshark.org/review/9651
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b4f912fd3..6fa7fc839d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1715,7 +1715,23 @@ if(BUILD_wireshark AND QT_FOUND) execute_process(COMMAND chmod a+x ${CMAKE_BINARY_DIR}/run/wireshark) endif() - target_link_libraries(wireshark ${wireshark_LIBS}) + if(APPLE) + # + # On Darwin, find where the Qt frameworks are + # located, and add that to the rpath, just in + # case this is Qt 5.5 or later and the frameworks + # have an install name that begins with @rpath + # and aren't installed in a frameworks directory + # that's searched by default. + # + # It would be *amazingly convenient* if we + # could get that from Qt's CMake configuration + # files, but we can't, so we have to extract it from + # an internal variable. + # + set(wireshark_rpath_flag "-Wl,-rpath,${_qt5Core_install_prefix}/lib") + endif(APPLE) + target_link_libraries(wireshark ${wireshark_rpath_flag} ${wireshark_LIBS}) install( TARGETS wireshark RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |