CMake Build: Fix LLVM lookup for cases when many versions available

If calling both find_package(Clang) and find_package(LLVM), call
find_package(Clang) first to get the currently active Clang version
by default with a consistent version of LLVM.

(Similar to the FindPythonInterp/PythonLibs ordering)

Change-Id: Ib6da04e0fb0ffc1fe67a8eafb0c5f04abbb36b6c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Alexander Akulich
2019-09-27 18:25:50 +03:00
committed by Alexandr Akulich
parent 736eef24ca
commit 0907bc8658

View File

@@ -97,8 +97,8 @@ else()
endif() endif()
install(TARGETS OptionalSvg EXPORT QtCreator) install(TARGETS OptionalSvg EXPORT QtCreator)
find_package(LLVM QUIET)
find_package(Clang COMPONENTS libclang QUIET) find_package(Clang COMPONENTS libclang QUIET)
find_package(LLVM QUIET)
if (APPLE) if (APPLE)
find_library(FWCoreFoundation CoreFoundation) find_library(FWCoreFoundation CoreFoundation)