Use same macdeployqt on Qt 5 and 6

This commit is contained in:
Jonas Kvinge 2020-12-28 20:54:19 +01:00
parent 8ea359ec8a
commit 50beda6621
2 changed files with 6 additions and 15 deletions

View File

@ -26,6 +26,9 @@ if(LINUX)
include(cmake/Rpm.cmake)
include(cmake/Deb.cmake)
endif()
if(APPLE)
include(cmake/Dmg.cmake)
endif()
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
@ -414,12 +417,6 @@ if(NOT CMAKE_CROSSCOMPILING)
)
endif()
# make dmg
# This needs to be included after the major Qt version is set.
if(APPLE)
include(cmake/Dmg.cmake)
endif()
# Set up definitions
add_definitions(-DBOOST_BIND_NO_PLACEHOLDERS)

View File

@ -1,13 +1,7 @@
if(BUILD_WITH_QT6)
set(MACDEPLOYQT_PATHS "/usr/local/opt/qt6/bin")
elseif(BUILD_WITH_QT5)
set(MACDEPLOYQT_PATHS "/usr/local/opt/qt5/bin")
find_program(MACDEPLOYQT_EXECUTABLE NAMES macdeployqt PATHS /usr/local/opt/qt6/bin /usr/local/opt/qt5/bin /usr/local/bin)
if(MACDEPLOYQT_EXECUTABLE)
message(STATUS "Found: ${MACDEPLOYQT_EXECUTABLE}")
else()
message(FATAL_ERROR "BUILD_WITH_QT6 or BUILD_WITH_QT5 must be set.")
endif()
find_program(MACDEPLOYQT_EXECUTABLE NAMES macdeployqt PATHS ${MACDEPLOYQT_PATHS} NO_DEFAULT_PATH)
if(NOT MACDEPLOYQT_EXECUTABLE)
message(WARNING "Missing macdeployqt executable.")
endif()