From 84c273c1c46827f0cffa686b53733d6ac1d0a430 2012-06-07 13:05:39 From: Tero Ahola Date: 2012-06-07 13:05:39 Subject: [PATCH] Fix name (id) of the installed library on OSX --- diff --git a/config.pri b/config.pri index e47c52b..4cde1f6 100644 --- a/config.pri +++ b/config.pri @@ -46,8 +46,6 @@ mac: { # it should probably define the minimum OSX version to be 10.5... QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5 QMAKE_LFLAGS *= -mmacosx-version-min=10.5 - - CHART_BUILD_LIB_DIR = $$CHART_BUILD_BIN_DIR } ##################### DEVELOPMENT BUILD ################################################### diff --git a/src/src.pro b/src/src.pro index 068f521..d774f36 100644 --- a/src/src.pro +++ b/src/src.pro @@ -168,9 +168,14 @@ win32:{ } mac: { - # Update the name (id) of the library on OSX to point to the lib dir + # Update the name (id) of the library on OSX to point to the lib path MAC_CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib" QMAKE_POST_LINK += "install_name_tool -id $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME" + + # Update the name (id) of the installed library on OSX to point to the installation path + postinstall.path = $$[QT_INSTALL_LIBS] + postinstall.extra = "install_name_tool -id $$[QT_INSTALL_LIBS]"/"$$MAC_CHARTS_LIB_NAME $$[QT_INSTALL_LIBS]"/"$$MAC_CHARTS_LIB_NAME" + INSTALLS += postinstall } ################################ DEVELOPMENT BUILD ##########################################