diff options
author | Stefan Brüns <stefan.bruens@rwth-aachen.de> | 2018-08-15 03:29:57 +0200 |
---|---|---|
committer | Stefan Brüns <stefan.bruens@rwth-aachen.de> | 2018-08-18 00:23:23 +0200 |
commit | 4b59c77083625219238d6e12d11554b7fd685a7a (patch) | |
tree | c2f036e35cd2cf38d9051b39e594b7477fe28746 | |
parent | ecbb28fa321fbf25aae0c19f4f3531c61e8c11b8 (diff) | |
download | extra-cmake-modules-4b59c77083625219238d6e12d11554b7fd685a7a.tar.gz extra-cmake-modules-4b59c77083625219238d6e12d11554b7fd685a7a.tar.bz2 |
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
-rw-r--r-- | find-modules/FindPythonModuleGeneration.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
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( |