git-svn-id: svn://db.shs.com.ru/libs@780 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -17,7 +17,8 @@ endif()
|
||||
# usage: find_qt([<Module1> <Module2> ...] [Qt4] [Qt5])
|
||||
# find Qt4 or/and Qt5 packages
|
||||
# if Qt4/5 found, set
|
||||
# * Qt<4/5>_BIN var to Qt binary dir
|
||||
# * Qt<4/5>_ROOT var to Qt root dir
|
||||
# * Qt<4/5>_BIN var to Qt binary dir
|
||||
# * Qt<4/5>_PLUGINS_DIR var to Qt plugins dir
|
||||
macro(find_qt)
|
||||
set(_QCOMP)
|
||||
@@ -27,6 +28,7 @@ macro(find_qt)
|
||||
set(MOC_INC_Qt${_v})
|
||||
set(Qt${_v}_INCLUDES)
|
||||
set(Qt${_v}_LIBRARIES)
|
||||
set(Qt${_v}_ROOT)
|
||||
set(Qt${_v}_BIN)
|
||||
set(Qt${_v}_PLUGINS_DIR)
|
||||
set(Qt${_v}_LANG_DIR)
|
||||
@@ -70,6 +72,7 @@ macro(find_qt)
|
||||
endforeach()
|
||||
set(Qt4_PLUGINS_DIR ${QT_PLUGINS_DIR})
|
||||
set(Qt4_LANG_DIR ${Qt4_BIN}/../translations)
|
||||
set(Qt4_ROOT "${Qt4_BIN}/../")
|
||||
endif()
|
||||
endif()
|
||||
if (_NEED5)
|
||||
@@ -105,12 +108,12 @@ macro(find_qt)
|
||||
break()
|
||||
endforeach()
|
||||
string(FIND "${Qt5_BIN}" "/" _ind REVERSE)
|
||||
string(SUBSTRING "${Qt5_BIN}" 0 ${_ind} _qt5_root)
|
||||
string(SUBSTRING "${Qt5_BIN}" 0 ${_ind} Qt5_ROOT)
|
||||
if ("x${Qt5_PLUGINS_DIR}" STREQUAL "x")
|
||||
set(Qt5_PLUGINS_DIR "${_qt5_root}/plugins")
|
||||
set(Qt5_PLUGINS_DIR "${Qt5_ROOT}/plugins")
|
||||
endif()
|
||||
if (APPLE)
|
||||
list(APPEND MOC_INC_Qt5 "-F${_qt5_root}/lib")
|
||||
list(APPEND MOC_INC_Qt5 "-F${Qt5_ROOT}/lib")
|
||||
endif()
|
||||
set(Qt5_LANG_DIR ${Qt5_BIN}/../translations)
|
||||
if (NOT _QT5_MSG)
|
||||
|
||||
Reference in New Issue
Block a user