Changeset View
Changeset View
Standalone View
Standalone View
cmake/modules/FindQalculate.cmake
Show All 24 Lines | 24 | if(NOT WIN32) | |||
---|---|---|---|---|---|
25 | include(FindPkgConfig) | 25 | include(FindPkgConfig) | ||
26 | 26 | | |||
27 | if(QALCULATE_MIN_VERSION) | 27 | if(QALCULATE_MIN_VERSION) | ||
28 | pkg_check_modules(_pc_QALCULATE libqalculate>=${QALCULATE_MIN_VERSION}) | 28 | pkg_check_modules(_pc_QALCULATE libqalculate>=${QALCULATE_MIN_VERSION}) | ||
29 | else(QALCULATE_MIN_VERSION) | 29 | else(QALCULATE_MIN_VERSION) | ||
30 | pkg_check_modules(_pc_QALCULATE libqalculate) | 30 | pkg_check_modules(_pc_QALCULATE libqalculate) | ||
31 | endif(QALCULATE_MIN_VERSION) | 31 | endif(QALCULATE_MIN_VERSION) | ||
32 | 32 | | |||
33 | pkg_check_modules(_pc_CLN cln) | | |||
34 | | ||||
35 | if(_pc_QALCULATE_FOUND) | 33 | if(_pc_QALCULATE_FOUND) | ||
34 | if(${_pc_QALCULATE_VERSION} VERSION_LESS 2.0.0) | ||||
35 | pkg_check_modules(_pc_CLN cln) | ||||
36 | endif() | ||||
36 | set(QALCULATE_CFLAGS ${_pc_QALCULATE_CFLAGS}) | 37 | set(QALCULATE_CFLAGS ${_pc_QALCULATE_CFLAGS}) | ||
37 | endif(_pc_QALCULATE_FOUND) | 38 | endif(_pc_QALCULATE_FOUND) | ||
38 | 39 | | |||
39 | find_library(QALCULATE_LIBRARIES | 40 | find_library(QALCULATE_LIBRARIES | ||
40 | NAMES | 41 | NAMES | ||
41 | qalculate | 42 | qalculate | ||
42 | PATHS | 43 | PATHS | ||
43 | ${_pc_QALCULATE_LIBRARY_DIRS} | 44 | ${_pc_QALCULATE_LIBRARY_DIRS} | ||
44 | ${LIB_INSTALL_DIR} | 45 | ${LIB_INSTALL_DIR} | ||
45 | ) | 46 | ) | ||
46 | 47 | | |||
47 | find_path(QALCULATE_INCLUDE_DIR | 48 | find_path(QALCULATE_INCLUDE_DIR | ||
48 | NAMES | 49 | NAMES | ||
49 | libqalculate | 50 | libqalculate | ||
50 | PATHS | 51 | PATHS | ||
51 | ${_pc_QALCULATE_INCLUDE_DIRS} | 52 | ${_pc_QALCULATE_INCLUDE_DIRS} | ||
52 | ${INCLUDE_INSTALL_DIR} | 53 | ${INCLUDE_INSTALL_DIR} | ||
53 | ) | 54 | ) | ||
54 | 55 | | |||
56 | if(_pc_QALCULATE_FOUND) | ||||
57 | if(${_pc_QALCULATE_VERSION} VERSION_LESS 2.0.0) | ||||
55 | find_library(CLN_LIBRARIES | 58 | find_library(CLN_LIBRARIES | ||
56 | NAMES | 59 | NAMES | ||
57 | cln | 60 | cln | ||
58 | PATHS | 61 | PATHS | ||
59 | ${_pc_CLN_LIBRARY_DIRS} | 62 | ${_pc_CLN_LIBRARY_DIRS} | ||
60 | ${LIB_INSTALL_DIR} | 63 | ${LIB_INSTALL_DIR} | ||
61 | ) | 64 | ) | ||
65 | endif() | ||||
66 | endif() | ||||
62 | 67 | | |||
63 | else(NOT WIN32) | 68 | else(NOT WIN32) | ||
64 | # XXX: currently no libqalculate on windows | 69 | # XXX: currently no libqalculate on windows | ||
65 | set(QALCULATE_FOUND FALSE) | 70 | set(QALCULATE_FOUND FALSE) | ||
66 | 71 | | |||
67 | endif(NOT WIN32) | 72 | endif(NOT WIN32) | ||
68 | 73 | | |||
69 | include(FindPackageHandleStandardArgs) | 74 | include(FindPackageHandleStandardArgs) | ||
70 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qalculate DEFAULT_MSG QALCULATE_LIBRARIES ) | 75 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qalculate DEFAULT_MSG QALCULATE_LIBRARIES ) | ||
71 | 76 | | |||
72 | mark_as_advanced(QALCULATE_CFLAGS QALCULATE_LIBRARIES) | 77 | mark_as_advanced(QALCULATE_CFLAGS QALCULATE_LIBRARIES) | ||
73 | 78 | | |||
74 | endif(QALCULATE_CFLAGS AND QALCULATE_LIBRARIES) | 79 | endif(QALCULATE_CFLAGS AND QALCULATE_LIBRARIES) |