git-svn-id: svn://db.shs.com.ru/libs@253 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -23,6 +23,7 @@ macro(find_qt)
|
||||
foreach(_v ${_QT_VERSIONS_})
|
||||
set(_NEED${_v} 0)
|
||||
set(LOCAL_FOUND${_v} 0)
|
||||
set(MOC_INC_Qt${_v})
|
||||
set(Qt${_v}_INCLUDES)
|
||||
set(Qt${_v}_LIBRARIES)
|
||||
set(Qt${_v}_BIN)
|
||||
@@ -69,7 +70,7 @@ macro(find_qt)
|
||||
#if (Qt5_FOUND)
|
||||
# set(_MSG 0)
|
||||
#endif()
|
||||
find_package(Qt5 COMPONENTS LinguistTools Widgets ${_QCOMP})
|
||||
find_package(Qt5 COMPONENTS LinguistTools UiPlugin Widgets ${_QCOMP})
|
||||
if (Qt5_FOUND)
|
||||
set(LOCAL_FOUND5 1)
|
||||
#cmake_policy(SET CMP0020 NEW)
|
||||
@@ -81,6 +82,11 @@ macro(find_qt)
|
||||
list(APPEND Qt5_LIBRARIES ${Qt5${m}_LIBRARIES})
|
||||
endif()
|
||||
endforeach()
|
||||
#get_property(_up_dir TARGET Qt5::UiPlugin PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
#message("${_up_dir}")
|
||||
#if (NOT "x${_up_dir}" STREQUAL "x")
|
||||
# list(APPEND Qt5_INCLUDES ${_up_dir})
|
||||
#endif()
|
||||
get_target_property(_Qt5_qmake Qt5::qmake LOCATION)
|
||||
get_filename_component(Qt5_BIN ${_Qt5_qmake} PATH)
|
||||
foreach(_p ${Qt5Gui_PLUGINS})
|
||||
@@ -92,10 +98,13 @@ macro(find_qt)
|
||||
#message("Qt5: plugins dir: ${Qt5_PLUGINS_DIR}")
|
||||
break()
|
||||
endforeach()
|
||||
string(FIND "${Qt5_BIN}" "/" _ind REVERSE)
|
||||
string(SUBSTRING "${Qt5_BIN}" 0 ${_ind} _qt5_root)
|
||||
if ("x${Qt5_PLUGINS_DIR}" STREQUAL "x")
|
||||
string(FIND "${Qt5_BIN}" "/" _ind REVERSE)
|
||||
string(SUBSTRING "${Qt5_BIN}" 0 ${_ind} _l)
|
||||
set(Qt5_PLUGINS_DIR "${_l}/plugins")
|
||||
set(Qt5_PLUGINS_DIR "${_qt5_root}/plugins")
|
||||
endif()
|
||||
if (APPLE)
|
||||
list(APPEND MOC_INC_Qt5 "-F${_qt5_root}/lib")
|
||||
endif()
|
||||
if (NOT _QT5_MSG)
|
||||
message(STATUS "Found Qt5: ${_Qt5_qmake} (found version \"${Qt5_VERSION}\")")
|
||||
@@ -104,9 +113,9 @@ macro(find_qt)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
# set()
|
||||
foreach(_v ${_QT_VERSIONS_})
|
||||
if (LOCAL_FOUND${_v})
|
||||
set(MOC_INC_Qt${_v})
|
||||
foreach(_p ${Qt${_v}_INCLUDES})
|
||||
list(APPEND MOC_INC_Qt${_v} "-I${_p}")
|
||||
#message("${_p}")
|
||||
@@ -114,6 +123,7 @@ macro(find_qt)
|
||||
endif()
|
||||
#message("${MOC_INC_Qt${_v}}")
|
||||
endforeach()
|
||||
|
||||
endmacro()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user