File: libzip.prf

package info (click to toggle)
openscad 2021.01-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 36,096 kB
  • sloc: cpp: 53,199; sh: 4,384; ansic: 4,382; python: 1,813; yacc: 853; javascript: 762; lex: 417; lisp: 163; xml: 127; makefile: 118
file content (37 lines) | stat: -rw-r--r-- 853 bytes parent folder | download | duplicates (5)
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
# Detect libzip, then use this priority list to determine
# which library to use:
#
# Priority
# 1. LIBZIP_INCLUDEPATH / LIBZIP_LIBPATH (qmake parameter, not checked it given on commandline)
# 3. system's standard include paths from pkg-config

exists($$LIBZIP_INCLUDEPATH/zip.h) {
  ENABLE_LIBZIP=yes
} else {
  LIBZIP_INCLUDEPATH =
  LIBZIP_LIBPATH =
}

isEmpty(LIBZIP_INCLUDEPATH) {
  LIBZIP_CFLAGS = $$system("$$PKG_CONFIG --cflags libzip")
  !isEmpty(LIBZIP_CFLAGS) {
    ENABLE_LIBZIP=yes
  }
} else {
  LIBZIP_CFLAGS = -I$$LIBZIP_INCLUDEPATH
}

isEmpty(LIBZIP_LIBPATH) {
  LIBZIP_LIBS = $$system("$$PKG_CONFIG --libs libzip")
  !isEmpty(LIBZIP_LIBS) {
    ENABLE_LIBZIP=yes
  }
} else {
  LIBZIP_LIBS = -L$$LIBZIP_LIBPATH -lzip
}

!isEmpty(ENABLE_LIBZIP) {
  DEFINES += ENABLE_LIBZIP
  QMAKE_CXXFLAGS += $$LIBZIP_CFLAGS
  LIBS += $$LIBZIP_LIBS
}