Use macdeployqt when building in all cases

This commit is contained in:
Julien Wadel 2021-11-04 12:25:29 +01:00
parent f736f110a6
commit 45eca7bd6e

View file

@ -213,13 +213,13 @@ elseif (APPLE)
)
install(CODE "execute_process(COMMAND install_name_tool -add_rpath \"@executable_path/../Frameworks/\" \"\${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app/Contents/MacOS/${EXECUTABLE_NAME}\")")
install(CODE "execute_process(COMMAND install_name_tool -add_rpath \"@executable_path/../lib/\" \"\${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app/Contents/MacOS/${EXECUTABLE_NAME}\")")
if(ENABLE_APP_PACKAGING)
find_program(DEPLOYQT_PROGRAM macdeployqt)
if (NOT DEPLOYQT_PROGRAM)
message(FATAL_ERROR "Could not find the macdeployqt program. Make sure it is in the PATH.")
endif()
install(CODE "execute_process(COMMAND ${DEPLOYQT_PROGRAM} \${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app -qmldir=${LINPHONE_QML_DIR})")
find_program(DEPLOYQT_PROGRAM macdeployqt)
if (NOT DEPLOYQT_PROGRAM)
message(FATAL_ERROR "Could not find the macdeployqt program. Make sure it is in the PATH.")
endif()
install(CODE "execute_process(COMMAND ${DEPLOYQT_PROGRAM} \${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app -qmldir=${LINPHONE_QML_DIR})")
if (LINPHONE_BUILDER_SIGNING_IDENTITY)
install(CODE "file(GLOB FRAMEWORKS_NAMES \"\${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app/Contents/Frameworks/*\")
foreach (FRAMEWORK \${FRAMEWORKS_NAMES})