summaryrefslogtreecommitdiffstats
path: root/Modules/FindQt4.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-07-22 12:27:22 (GMT)
committerBrad King <brad.king@kitware.com>2013-07-24 14:46:00 (GMT)
commit969e7ee5df77b5856e26633273547700a40f48a2 (patch)
tree69bbe633db2d92657a4084d68d8d47147e81d6fc /Modules/FindQt4.cmake
parentb8af46cb878551cc5a1c9275f46792b282479ebb (diff)
downloadCMake-969e7ee5df77b5856e26633273547700a40f48a2.zip
CMake-969e7ee5df77b5856e26633273547700a40f48a2.tar.gz
CMake-969e7ee5df77b5856e26633273547700a40f48a2.tar.bz2
FindQt4: Don't use Qt component _FOUND vars before they're defined (#14286)
This fixes a regression introduced by commit b8af46cb (FindQt4: Don't fail if certain Qt modules are unavailable., 2013-05-23) The _FOUND variable is set by the _QT4_ADJUST_LIB_VARS macro, so invoke that unconditionally, and guard only the set_property calls, as described in the original bug report (#14165).
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r--Modules/FindQt4.cmake30
1 files changed, 12 insertions, 18 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 4c05cc0..d821ff9 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -881,20 +881,16 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
endforeach()
if(Q_WS_WIN)
- if (QT_QAXCONTAINER_FOUND)
- set(QT_MODULES ${QT_MODULES} QAxContainer)
- # Set QT_AXCONTAINER_INCLUDE_DIR and QT_AXSERVER_INCLUDE_DIR
- find_path(QT_QAXCONTAINER_INCLUDE_DIR ActiveQt
- PATHS ${QT_HEADERS_DIR}/ActiveQt
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
- )
- endif()
- if (QT_QAXSERVER_FOUND)
- find_path(QT_QAXSERVER_INCLUDE_DIR ActiveQt
- PATHS ${QT_HEADERS_DIR}/ActiveQt
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
- )
- endif()
+ set(QT_MODULES ${QT_MODULES} QAxContainer)
+ # Set QT_AXCONTAINER_INCLUDE_DIR and QT_AXSERVER_INCLUDE_DIR
+ find_path(QT_QAXCONTAINER_INCLUDE_DIR ActiveQt
+ PATHS ${QT_HEADERS_DIR}/ActiveQt
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
+ )
+ find_path(QT_QAXSERVER_INCLUDE_DIR ActiveQt
+ PATHS ${QT_HEADERS_DIR}/ActiveQt
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
+ )
endif()
# Set QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR
@@ -1055,8 +1051,8 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
if(Q_WS_WIN)
_QT4_ADJUST_LIB_VARS(qtmain)
+ _QT4_ADJUST_LIB_VARS(QAxServer)
if(QT_QAXSERVER_FOUND)
- _QT4_ADJUST_LIB_VARS(QAxServer)
set_property(TARGET Qt4::QAxServer PROPERTY
INTERFACE_QT4_NO_LINK_QTMAIN ON
)
@@ -1064,9 +1060,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
COMPATIBLE_INTERFACE_BOOL QT4_NO_LINK_QTMAIN)
endif()
- if(QT_QAXCONTAINER_FOUND)
- _QT4_ADJUST_LIB_VARS(QAxContainer)
- endif()
+ _QT4_ADJUST_LIB_VARS(QAxContainer)
endif()
# Only public dependencies are listed here.