This commit is contained in:
2020-09-06 22:35:26 +03:00
parent b1536eb16a
commit 5ed8d8114a
2 changed files with 12 additions and 11 deletions

View File

@@ -33,12 +33,12 @@ option(DESIGNER_PLUGINS "Build Qt designer plugins" ${_plugins_default_})
macro(qad_library NAME _MODULES _LIBS)
shstk_qt_project(qad_${NAME} FALSE "qad" "${_MODULES}" "${_LIBS}" ${ARGN})
shstk_qt_install("qad" FALSE qad_${NAME} "${out_HDR}" "${out_QM}")
shstk_qt_install("qad" FALSE qad_${NAME} "${out_HDR}" "out_QM")
endmacro()
macro(qad_application NAME _MODULES _LIBS)
shstk_qt_project(${NAME} TRUE "qad" "${_MODULES}" "${_LIBS}" ${ARGN})
shstk_qt_install("qad" TRUE ${NAME} "" "${out_QM}")
shstk_qt_install("qad" TRUE ${NAME} "" "out_QM")
endmacro()
macro(qad_plugin NAME _MODULES _LIBS)

View File

@@ -207,9 +207,9 @@ macro(find_qt)
list(APPEND Qt4_LIBRARIES ${QT_QT${_um}_LIBRARY})
endif()
endforeach()
set(Qt4_PLUGINS_DIR ${QT_PLUGINS_DIR})
set(Qt4_LANG_DIR ${Qt4_BIN}/../translations)
set(Qt4_ROOT "${Qt4_BIN}/../")
set(Qt4_PLUGINS_DIR ${QT_PLUGINS_DIR} CACHE STRING "")
set(Qt4_LANG_DIR ${Qt4_BIN}/../translations CACHE STRING "")
set(Qt4_ROOT "${Qt4_BIN}/../" CACHE STRING "")
endif()
endif()
if (_NEED5)
@@ -246,25 +246,26 @@ macro(find_qt)
# list(APPEND Qt5_INCLUDES ${_up_dir})
#endif()
get_target_property(_Qt5_qmake Qt5::qmake LOCATION)
get_filename_component(Qt5_BIN ${_Qt5_qmake} PATH)
get_filename_component(_Qt5_BIN ${_Qt5_qmake} PATH)
foreach(_p ${Qt5Gui_PLUGINS})
get_target_property(_l ${_p} LOCATION)
get_filename_component(_l ${_l} DIRECTORY)
string(FIND "${_l}" "/" _ind REVERSE)
string(SUBSTRING "${_l}" 0 ${_ind} _l)
set(Qt5_PLUGINS_DIR ${_l})
#message("Qt5: plugins dir: ${Qt5_PLUGINS_DIR}")
break()
endforeach()
string(FIND "${Qt5_BIN}" "/" _ind REVERSE)
string(SUBSTRING "${Qt5_BIN}" 0 ${_ind} Qt5_ROOT)
string(FIND "${_Qt5_BIN}" "/" _ind REVERSE)
string(SUBSTRING "${_Qt5_BIN}" 0 ${_ind} _Qt5_ROOT)
set(Qt5_ROOT "${_Qt5_ROOT}" CACHE STRING "")
set(Qt5_BIN "${_Qt5_BIN}" CACHE STRING "")
set(Qt5_LANG_DIR ${Qt5_BIN}/../translations CACHE STRING "")
if ("x${Qt5_PLUGINS_DIR}" STREQUAL "x")
set(Qt5_PLUGINS_DIR "${Qt5_ROOT}/plugins")
set(Qt5_PLUGINS_DIR "${Qt5_ROOT}/plugins" CACHE STRING "")
endif()
if (APPLE)
list(APPEND MOC_INC_Qt5 "-F${Qt5_ROOT}/lib")
endif()
set(Qt5_LANG_DIR ${Qt5_BIN}/../translations)
if (NOT _QT5_MSG)
message(STATUS "Found Qt5: ${_Qt5_qmake} (version \"${Qt5_VERSION}\")")
set(_QT5_MSG 1 CACHE BOOL "msg_qt5" FORCE)