cmake/Python - don't require pkg-config, only use if available.

Issue#68
This commit is contained in:
Allen Winter
2020-09-03 18:14:14 -04:00
parent 518a7cb398
commit 63f8468f48
2 changed files with 12 additions and 6 deletions

View File

@@ -13,9 +13,12 @@
# PYSIDE_TYPESYSTEMS - Type system files that should be used by other bindings extending PySide2
#
# You can install PySide2 from Qt repository with
# pip3 install --index-url=https://download.qt.io/snapshots/ci/pyside/<Qt-Version>/latest/ pyside2 --trusted-host download.qt.io
find_package(PkgConfig REQUIRED)
pkg_check_modules(PYSIDE2_PRIV pyside2 QUIET)
# pip3 install --index-url=https://download.qt.io/official_releases/QtForPython --trusted-host download.qt.io pyside2
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PYSIDE2_PRIV QUIET pyside2)
endif()
set(PYSIDE2_FOUND FALSE)