From 57c0a82557cfbf8bb4ccbd5049f07a58ab47fa62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 13 Aug 2022 14:37:00 +0200 Subject: [PATCH] core: fix CMake warning in Python detection --- CMakeLists.txt | 3 ++- cmake/FindPython.cmake | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 965f117f5..4ed408c60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,6 +151,8 @@ endif() add_definitions(-DHAVE_CONFIG_H) +include(FindPkgConfig) + include(CheckIncludeFiles) include(CheckFunctionExists) include(CheckSymbolExists) @@ -198,7 +200,6 @@ list(APPEND EXTRA_LIBS gnutls) find_package(ZLIB REQUIRED) # Check for zstd -include(FindPkgConfig) pkg_check_modules(LIBZSTD REQUIRED libzstd) # Check for iconv diff --git a/cmake/FindPython.cmake b/cmake/FindPython.cmake index d8f908c6e..48d5172e3 100644 --- a/cmake/FindPython.cmake +++ b/cmake/FindPython.cmake @@ -28,8 +28,6 @@ # PYTHON_LIBRARIES = path to where libpython.so* can be found # PYTHON_LDFLAGS = python compiler options for linking -include(FindPkgConfig) - if(ENABLE_PYTHON2) pkg_check_modules(PYTHON python2 IMPORTED_TARGET GLOBAL) else()