forked from danmar/cppcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfindDependencies.cmake
More file actions
62 lines (56 loc) · 1.75 KB
/
findDependencies.cmake
File metadata and controls
62 lines (56 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
if (BUILD_GUI)
list(APPEND qt_components Core Gui Widgets PrintSupport LinguistTools Help)
if (WITH_QCHART)
list(APPEND qt_components Charts)
endif()
if (BUILD_TESTS)
list(APPEND qt_components Test)
endif()
find_package(Qt5 COMPONENTS ${qt_components} REQUIRED)
endif()
if (HAVE_RULES)
find_path(PCRE_INCLUDE pcre.h)
find_library(PCRE_LIBRARY pcre)
if (NOT PCRE_LIBRARY OR NOT PCRE_INCLUDE)
message(FATAL_ERROR "pcre dependency for RULES has not been found")
endif()
endif()
if (USE_Z3)
find_package(Z3 QUIET)
if (NOT Z3_FOUND)
find_library(Z3_LIBRARIES z3)
if (NOT Z3_LIBRARIES)
message(FATAL_ERROR "z3 dependency has not been found")
endif()
find_path(Z3_CXX_INCLUDE_DIRS z3++.h PATH_SUFFIXES "z3")
if (NOT Z3_CXX_INCLUDE_DIRS)
message(FATAL_ERROR "z3++.h has not been found")
endif()
endif()
endif()
set(CMAKE_INCLUDE_CURRENT_DIR ON)
if (NOT USE_MATCHCOMPILER_OPT MATCHES "Off")
find_package(PythonInterp 3 QUIET)
if (NOT PYTHONINTERP_FOUND)
set(PYTHONINTERP_FOUND "")
find_package(PythonInterp 2.7 QUIET)
if (NOT PYTHONINTERP_FOUND)
message(WARNING "No python interpreter found. Therefore, the match compiler is switched off.")
set(USE_MATCHCOMPILER_OPT "Off")
endif()
endif()
endif()
if (NOT USE_BUNDLED_TINYXML2)
find_package(tinyxml2 QUIET)
if (NOT tinyxml2_FOUND)
find_library(tinyxml2_LIBRARY tinyxml2)
if (NOT tinyxml2_LIBRARY)
message(FATAL_ERROR "tinyxml2 has not been found")
else()
set(tinyxml2_FOUND 1)
endif()
endif()
endif()
if (USE_THREADS)
find_package(Threads REQUIRED)
endif()