Fix issues with find_path() for QtCore include dir on Mac. Fixes 11868.
This commit is contained in:
parent
9e81dddc4f
commit
4167be052f
|
@ -607,14 +607,25 @@ IF (QT4_QMAKE_FOUND)
|
||||||
FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE
|
FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE
|
||||||
NAMES QtCore${QT_LIBINFIX} QtCore${QT_LIBINFIX}4
|
NAMES QtCore${QT_LIBINFIX} QtCore${QT_LIBINFIX}4
|
||||||
HINTS ${QT_LIBRARY_DIR_TMP}
|
HINTS ${QT_LIBRARY_DIR_TMP}
|
||||||
NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH
|
NO_DEFAULT_PATH
|
||||||
)
|
)
|
||||||
FIND_LIBRARY(QT_QTCORE_LIBRARY_DEBUG
|
FIND_LIBRARY(QT_QTCORE_LIBRARY_DEBUG
|
||||||
NAMES QtCore${QT_LIBINFIX}_debug QtCore${QT_LIBINFIX}d QtCore${QT_LIBINFIX}d4
|
NAMES QtCore${QT_LIBINFIX}_debug QtCore${QT_LIBINFIX}d QtCore${QT_LIBINFIX}d4
|
||||||
HINTS ${QT_LIBRARY_DIR_TMP}
|
HINTS ${QT_LIBRARY_DIR_TMP}
|
||||||
NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH
|
NO_DEFAULT_PATH
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IF(NOT QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCORE_LIBRARY_DEBUG)
|
||||||
|
FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE
|
||||||
|
NAMES QtCore${QT_LIBINFIX} QtCore${QT_LIBINFIX}4
|
||||||
|
HINTS ${QT_LIBRARY_DIR_TMP}
|
||||||
|
)
|
||||||
|
FIND_LIBRARY(QT_QTCORE_LIBRARY_DEBUG
|
||||||
|
NAMES QtCore${QT_LIBINFIX}_debug QtCore${QT_LIBINFIX}d QtCore${QT_LIBINFIX}d4
|
||||||
|
HINTS ${QT_LIBRARY_DIR_TMP}
|
||||||
|
)
|
||||||
|
ENDIF(NOT QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCORE_LIBRARY_DEBUG)
|
||||||
|
|
||||||
# try dropping a hint if trying to use Visual Studio with Qt built by mingw
|
# try dropping a hint if trying to use Visual Studio with Qt built by mingw
|
||||||
IF(NOT QT_QTCORE_LIBRARY_RELEASE AND MSVC)
|
IF(NOT QT_QTCORE_LIBRARY_RELEASE AND MSVC)
|
||||||
IF(EXISTS ${QT_LIBRARY_DIR_TMP}/libqtmain.a)
|
IF(EXISTS ${QT_LIBRARY_DIR_TMP}/libqtmain.a)
|
||||||
|
@ -644,10 +655,13 @@ IF (QT4_QMAKE_FOUND)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF (APPLE)
|
IF (APPLE)
|
||||||
|
SET(CMAKE_FIND_FRAMEWORK_OLD ${CMAKE_FIND_FRAMEWORK})
|
||||||
IF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
|
IF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
|
||||||
SET(QT_USE_FRAMEWORKS ON CACHE INTERNAL "" FORCE)
|
SET(QT_USE_FRAMEWORKS ON CACHE INTERNAL "" FORCE)
|
||||||
|
SET(CMAKE_FIND_FRAMEWORK FIRST)
|
||||||
ELSE (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
|
ELSE (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
|
||||||
SET(QT_USE_FRAMEWORKS OFF CACHE INTERNAL "" FORCE)
|
SET(QT_USE_FRAMEWORKS OFF CACHE INTERNAL "" FORCE)
|
||||||
|
SET(CMAKE_FIND_FRAMEWORK LAST)
|
||||||
ENDIF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
|
ENDIF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
|
||||||
MARK_AS_ADVANCED(QT_USE_FRAMEWORKS)
|
MARK_AS_ADVANCED(QT_USE_FRAMEWORKS)
|
||||||
ENDIF (APPLE)
|
ENDIF (APPLE)
|
||||||
|
@ -663,8 +677,7 @@ IF (QT4_QMAKE_FOUND)
|
||||||
_qt4_query_qmake(QT_INSTALL_HEADERS qt_headers)
|
_qt4_query_qmake(QT_INSTALL_HEADERS qt_headers)
|
||||||
SET(QT_QTCORE_INCLUDE_DIR NOTFOUND)
|
SET(QT_QTCORE_INCLUDE_DIR NOTFOUND)
|
||||||
FIND_PATH(QT_QTCORE_INCLUDE_DIR QtCore
|
FIND_PATH(QT_QTCORE_INCLUDE_DIR QtCore
|
||||||
HINTS ${qt_headers}
|
HINTS ${qt_headers} ${QT_LIBRARY_DIR}
|
||||||
${QT_LIBRARY_DIR}/QtCore.framework/Headers
|
|
||||||
PATH_SUFFIXES QtCore
|
PATH_SUFFIXES QtCore
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -682,6 +695,10 @@ IF (QT4_QMAKE_FOUND)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
IF(APPLE)
|
||||||
|
SET(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_OLD})
|
||||||
|
ENDIF(APPLE)
|
||||||
|
|
||||||
# Set QT_INCLUDE_DIR based on QT_HEADERS_DIR
|
# Set QT_INCLUDE_DIR based on QT_HEADERS_DIR
|
||||||
IF(QT_HEADERS_DIR)
|
IF(QT_HEADERS_DIR)
|
||||||
IF(QT_USE_FRAMEWORKS)
|
IF(QT_USE_FRAMEWORKS)
|
||||||
|
|
Loading…
Reference in New Issue