mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 10:46:04 +03:00
Use proper include files in the QtSingleApplication find module.
Look for qtsinglecoreapplication.h when Qt5Widgets module was not found, and qtsingleapplication.h otherwise. Fixes #9196. This also removes Qt4 support from the QtSingleApplication find module.
This commit is contained in:
parent
c7f1f1494e
commit
af7b40ecc2
1 changed files with 20 additions and 35 deletions
|
@ -12,28 +12,14 @@
|
||||||
|
|
||||||
SET(QtSingleApplication_FOUND FALSE)
|
SET(QtSingleApplication_FOUND FALSE)
|
||||||
|
|
||||||
IF(QT4_FOUND)
|
if (Qt5Widgets_FOUND)
|
||||||
message(STATUS "Looking for Qt4 single application library")
|
set(_includeFileName qtsingleapplication.h)
|
||||||
FIND_PATH(QtSingleApplication_INCLUDE_DIR QtSingleApplication
|
else()
|
||||||
# standard locations
|
set(_includeFileName qtsinglecoreapplication.h)
|
||||||
/usr/include
|
endif()
|
||||||
/usr/include/QtSolutions
|
|
||||||
# qt4 location except mac's frameworks
|
|
||||||
"${QT_INCLUDE_DIR}/QtSolutions"
|
|
||||||
# mac's frameworks
|
|
||||||
${FRAMEWORK_INCLUDE_DIR}/QtSolutions
|
|
||||||
)
|
|
||||||
|
|
||||||
SET(QtSingleApplication_NAMES ${QtSingleApplication_NAMES}
|
|
||||||
QtSolutions_SingleApplication-2.6 libQtSolutions_SingleApplication-2.6)
|
|
||||||
FIND_LIBRARY(QtSingleApplication_LIBRARY
|
|
||||||
NAMES ${QtSingleApplication_NAMES}
|
|
||||||
PATHS ${QT_LIBRARY_DIR}
|
|
||||||
)
|
|
||||||
ELSEIF(Qt5Core_FOUND)
|
|
||||||
message(STATUS "Looking for Qt5 single application library")
|
|
||||||
FOREACH(TOP_INCLUDE_PATH in ${Qt5Core_INCLUDE_DIRS} ${FRAMEWORK_INCLUDE_DIR})
|
FOREACH(TOP_INCLUDE_PATH in ${Qt5Core_INCLUDE_DIRS} ${FRAMEWORK_INCLUDE_DIR})
|
||||||
FIND_PATH(QtSingleApplication_INCLUDE_DIR QtSingleApplication ${TOP_INCLUDE_PATH}/QtSolutions)
|
FIND_PATH(QtSingleApplication_INCLUDE_DIR ${_includeFileName} ${TOP_INCLUDE_PATH}/QtSolutions)
|
||||||
|
|
||||||
IF(QtSingleApplication_INCLUDE_DIR)
|
IF(QtSingleApplication_INCLUDE_DIR)
|
||||||
BREAK()
|
BREAK()
|
||||||
|
@ -50,7 +36,6 @@ ELSEIF(Qt5Core_FOUND)
|
||||||
NAMES ${QtSingleApplication_NAMES}
|
NAMES ${QtSingleApplication_NAMES}
|
||||||
PATHS ${_QT5_CORELIBRARYPATH}
|
PATHS ${_QT5_CORELIBRARYPATH}
|
||||||
)
|
)
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF (QtSingleApplication_LIBRARY AND QtSingleApplication_INCLUDE_DIR)
|
IF (QtSingleApplication_LIBRARY AND QtSingleApplication_INCLUDE_DIR)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue