From 4b59c77083625219238d6e12d11554b7fd685a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Wed, 15 Aug 2018 03:29:57 +0200 Subject: Bindings: Check for libclang without version suffix also Summary: The canonical name is libclang.so, which seems to be available on all distributions (RH, SUSE, Ubuntu, Debian, ...) while the symlinks with version suffix (e.g. libclang-6.0) are specific to Debian and derivatives. Keep the current checks, but fallback to the unversioned library name. Test Plan: on openSUSE TW/Leap: run cmake -> libclang is found Reviewers: #frameworks, dfaure Reviewed By: dfaure Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D14909 --- find-modules/FindPythonModuleGeneration.cmake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'find-modules/FindPythonModuleGeneration.cmake') diff --git a/find-modules/FindPythonModuleGeneration.cmake b/find-modules/FindPythonModuleGeneration.cmake index 31cc52dd..1d6079e9 100644 --- a/find-modules/FindPythonModuleGeneration.cmake +++ b/find-modules/FindPythonModuleGeneration.cmake @@ -201,6 +201,9 @@ if (NOT libclang_LIBRARY) find_library(libclang_LIBRARY clang-3.8) endif() endif() + if (NOT libclang_LIBRARY) + find_library(libclang_LIBRARY clang) + endif() else() string(REGEX MATCH ".*clang-([0-9]+\\.[0-9]+).*" _GPB_CLANG_SUFFIX ${libclang_LIBRARY}) set(_GPB_CLANG_SUFFIX ${CMAKE_MATCH_1}) @@ -208,6 +211,8 @@ endif() if (NOT libclang_LIBRARY) _report_NOT_FOUND("Could not find libclang version 3.8 or greater.") +else() + message(STATUS "Found ${libclang_LIBRARY}") endif() execute_process( -- cgit v1.2.1