Revert "Search in default path before calling find_package"

Build system changes can be potentially breaking and so must be reviewed
prior to commit. In addition, there is no explanation for this change.

Simon, you might want to submit your patches to Phabricator for review
prior to landing them.

CCMAIL: sdepiets@gmail.com

This reverts commit 693cf9d9.
parent 46c8b2a2
......@@ -65,32 +65,20 @@ if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12)
message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use FindQt5ThemeSupport.cmake")
endif()
#Trying to find in the default paths
# Use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
pkg_check_modules(PKG_Qt5ThemeSupport QUIET Qt5Gui)
set(Qt5ThemeSupport_DEFINITIONS ${PKG_Qt5ThemeSupport_CFLAGS_OTHER})
set(Qt5ThemeSupport_VERSION ${PKG_Qt5ThemeSupport_VERSION})
find_path(Qt5ThemeSupport_INCLUDE_DIR
NAMES
QtThemeSupport/private/qgenericunixthemes_p.h
PATH_SUFFIXES
QtThemeSupport/${Qt5Widgets_VERSION}/
HINTS
${PKG_Qt5ThemeSupport_INCLUDEDIR}/QtThemeSupport/${PKG_Qt5ThemeSupport_VERSION}/
)
if (Qt5ThemeSupport_INCLUDE_DIR)
set(Qt5ThemeSupport_VERSION ${Qt5Widgets_VERSION})
else()
# Use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
pkg_check_modules(PKG_Qt5ThemeSupport QUIET Qt5Gui)
set(Qt5ThemeSupport_DEFINITIONS ${PKG_Qt5ThemeSupport_CFLAGS_OTHER})
set(Qt5ThemeSupport_VERSION ${PKG_Qt5ThemeSupport_VERSION})
find_path(Qt5ThemeSupport_INCLUDE_DIR
NAMES
QtThemeSupport/private/qgenericunixthemes_p.h
HINTS
${PKG_Qt5ThemeSupport_INCLUDEDIR}/QtThemeSupport/${PKG_Qt5ThemeSupport_VERSION}/
)
endif()
find_library(Qt5ThemeSupport_LIBRARY
NAMES
Qt5ThemeSupport
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment