Search in default path before calling pkg-config
This commit is contained in:
parent
3a46b3707a
commit
4f4f3295f2
4 changed files with 88 additions and 40 deletions
|
@ -65,20 +65,32 @@ 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 FindQt5EventDispatcherSupport.cmake")
|
message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use FindQt5EventDispatcherSupport.cmake")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Use pkg-config to get the directories and then use these values
|
#Trying to find in the default paths
|
||||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
|
||||||
find_package(PkgConfig)
|
|
||||||
pkg_check_modules(PKG_Qt5EventDispatcherSupport QUIET Qt5Gui)
|
|
||||||
|
|
||||||
set(Qt5EventDispatcherSupport_DEFINITIONS ${PKG_Qt5EventDispatcherSupport_CFLAGS_OTHER})
|
|
||||||
set(Qt5EventDispatcherSupport_VERSION ${PKG_Qt5EventDispatcherSupport_VERSION})
|
|
||||||
|
|
||||||
find_path(Qt5EventDispatcherSupport_INCLUDE_DIR
|
find_path(Qt5EventDispatcherSupport_INCLUDE_DIR
|
||||||
NAMES
|
NAMES
|
||||||
QtEventDispatcherSupport/private/qunixeventdispatcher_qpa_p.h
|
QtEventDispatcherSupport/private/qunixeventdispatcher_qpa_p.h
|
||||||
HINTS
|
PATH_SUFFIXES
|
||||||
${PKG_Qt5EventDispatcherSupport_INCLUDEDIR}/QtEventDispatcherSupport/${PKG_Qt5EventDispatcherSupport_VERSION}/
|
QtEventDispatcherSupport/${Qt5Core_VERSION}/
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (Qt5EventDispatcherSupport_INCLUDE_DIR)
|
||||||
|
set(Qt5EventDispatcherSupport_VERSION ${Qt5Core_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_Qt5EventDispatcherSupport QUIET Qt5Gui)
|
||||||
|
|
||||||
|
set(Qt5EventDispatcherSupport_DEFINITIONS ${PKG_Qt5EventDispatcherSupport_CFLAGS_OTHER})
|
||||||
|
set(Qt5EventDispatcherSupport_VERSION ${PKG_Qt5EventDispatcherSupport_VERSION})
|
||||||
|
find_path(Qt5EventDispatcherSupport_INCLUDE_DIR
|
||||||
|
NAMES
|
||||||
|
QtEventDispatcherSupport/private/qunixeventdispatcher_qpa_p.h
|
||||||
|
HINTS
|
||||||
|
${PKG_Qt5EventDispatcherSupport_INCLUDEDIR}/QtEventDispatcherSupport/${PKG_Qt5EventDispatcherSupport_VERSION}/
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_library(Qt5EventDispatcherSupport_LIBRARY
|
find_library(Qt5EventDispatcherSupport_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
Qt5EventDispatcherSupport
|
Qt5EventDispatcherSupport
|
||||||
|
|
|
@ -65,20 +65,32 @@ 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 FindQt5FontDatabaseSupport.cmake")
|
message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use FindQt5FontDatabaseSupport.cmake")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Use pkg-config to get the directories and then use these values
|
#Trying to find in the default paths
|
||||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
|
||||||
find_package(PkgConfig)
|
|
||||||
pkg_check_modules(PKG_Qt5FontDatabaseSupport QUIET Qt5Gui)
|
|
||||||
|
|
||||||
set(Qt5FontDatabaseSupport_DEFINITIONS ${PKG_Qt5FontDatabaseSupport_CFLAGS_OTHER})
|
|
||||||
set(Qt5FontDatabaseSupport_VERSION ${PKG_Qt5FontDatabaseSupport_VERSION})
|
|
||||||
|
|
||||||
find_path(Qt5FontDatabaseSupport_INCLUDE_DIR
|
find_path(Qt5FontDatabaseSupport_INCLUDE_DIR
|
||||||
NAMES
|
NAMES
|
||||||
QtFontDatabaseSupport/private/qfontconfigdatabase_p.h
|
QtFontDatabaseSupport/private/qfontconfigdatabase_p.h
|
||||||
HINTS
|
PATH_SUFFIXES
|
||||||
${PKG_Qt5FontDatabaseSupport_INCLUDEDIR}/QtFontDatabaseSupport/${PKG_Qt5FontDatabaseSupport_VERSION}/
|
QtFontDatabaseSupport/${Qt5Core_VERSION}/
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (Qt5FontDatabaseSupport_INCLUDE_DIR)
|
||||||
|
set(Qt5FontDatabaseSupport_VERSION ${Qt5Core_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_Qt5FontDatabaseSupport QUIET Qt5Gui)
|
||||||
|
|
||||||
|
set(Qt5FontDatabaseSupport_DEFINITIONS ${PKG_Qt5FontDatabaseSupport_CFLAGS_OTHER})
|
||||||
|
set(Qt5FontDatabaseSupport_VERSION ${PKG_Qt5FontDatabaseSupport_VERSION})
|
||||||
|
find_path(Qt5FontDatabaseSupport_INCLUDE_DIR
|
||||||
|
NAMES
|
||||||
|
QtFontDatabaseSupport/private/qfontconfigdatabase_p.h
|
||||||
|
HINTS
|
||||||
|
${PKG_Qt5FontDatabaseSupport_INCLUDEDIR}/QtFontDatabaseSupport/${PKG_Qt5FontDatabaseSupport_VERSION}/
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_library(Qt5FontDatabaseSupport_LIBRARY
|
find_library(Qt5FontDatabaseSupport_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
Qt5FontDatabaseSupport
|
Qt5FontDatabaseSupport
|
||||||
|
|
|
@ -64,20 +64,32 @@ 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 FindQt5PlatformSupport.cmake")
|
message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use FindQt5PlatformSupport.cmake")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Use pkg-config to get the directories and then use these values
|
#Trying to find in the default paths
|
||||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
|
||||||
find_package(PkgConfig)
|
|
||||||
pkg_check_modules(PKG_Qt5PlatformSupport QUIET Qt5Gui)
|
|
||||||
|
|
||||||
set(Qt5PlatformSupport_DEFINITIONS ${PKG_Qt5PlatformSupport_CFLAGS_OTHER})
|
|
||||||
set(Qt5PlatformSupport_VERSION ${PKG_Qt5PlatformSupport_VERSION})
|
|
||||||
|
|
||||||
find_path(Qt5PlatformSupport_INCLUDE_DIR
|
find_path(Qt5PlatformSupport_INCLUDE_DIR
|
||||||
NAMES
|
NAMES
|
||||||
QtPlatformSupport/private/qfontconfigdatabase_p.h
|
QtPlatformSupport/private/qfontconfigdatabase_p.h
|
||||||
HINTS
|
PATH_SUFFIXES
|
||||||
${PKG_Qt5PlatformSupport_INCLUDEDIR}/QtPlatformSupport/${PKG_Qt5PlatformSupport_VERSION}/
|
QtPlatformSupport/${Qt5Core_VERSION}/
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (Qt5PlatformSupport_INCLUDE_DIR)
|
||||||
|
set(Qt5PlatformSupport_VERSION ${Qt5Core_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_Qt5PlatformSupport QUIET Qt5Gui)
|
||||||
|
|
||||||
|
set(Qt5PlatformSupport_DEFINITIONS ${PKG_Qt5PlatformSupport_CFLAGS_OTHER})
|
||||||
|
set(Qt5PlatformSupport_VERSION ${PKG_Qt5PlatformSupport_VERSION})
|
||||||
|
find_path(Qt5PlatformSupport_INCLUDE_DIR
|
||||||
|
NAMES
|
||||||
|
QtPlatformSupport/private/qfontconfigdatabase_p.h
|
||||||
|
HINTS
|
||||||
|
${PKG_Qt5PlatformSupport_INCLUDEDIR}/QtPlatformSupport/${PKG_Qt5PlatformSupport_VERSION}/
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_library(Qt5PlatformSupport_LIBRARY
|
find_library(Qt5PlatformSupport_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
Qt5PlatformSupport
|
Qt5PlatformSupport
|
||||||
|
|
|
@ -65,20 +65,32 @@ 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")
|
message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use FindQt5ThemeSupport.cmake")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Use pkg-config to get the directories and then use these values
|
#Trying to find in the default paths
|
||||||
# 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
|
find_path(Qt5ThemeSupport_INCLUDE_DIR
|
||||||
NAMES
|
NAMES
|
||||||
QtThemeSupport/private/qgenericunixthemes_p.h
|
QtThemeSupport/private/qgenericunixthemes_p.h
|
||||||
HINTS
|
PATH_SUFFIXES
|
||||||
${PKG_Qt5ThemeSupport_INCLUDEDIR}/QtThemeSupport/${PKG_Qt5ThemeSupport_VERSION}/
|
QtThemeSupport/${Qt5Core_VERSION}/
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (Qt5ThemeSupport_INCLUDE_DIR)
|
||||||
|
set(Qt5ThemeSupport_VERSION ${Qt5Core_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
|
find_library(Qt5ThemeSupport_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
Qt5ThemeSupport
|
Qt5ThemeSupport
|
||||||
|
|
Loading…
Reference in a new issue