forked from fritzing/fritzing-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libgit2detect.pri
60 lines (53 loc) · 2.11 KB
/
libgit2detect.pri
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
# /*******************************************************************
# Part of the Fritzing project - http://fritzing.org
# Copyright (c) 2016 Fritzing
# Fritzing is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Fritzing is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with Fritzing. If not, see <http://www.gnu.org/licenses/>.
# ********************************************************************
LIBGIT2INCLUDE = "$$_PRO_FILE_PWD_/../libgit2/include"
exists($$LIBGIT2INCLUDE/git2.h) {
message("found libgit2 include path at $$LIBGIT2INCLUDE")
} else {
message("Fritzing requires libgit2")
message("Build it from the repo at https://github.com/libgit2")
message("See https://github.com/fritzing/fritzing-app/wiki for details.")
error("libgit2 include path not found in $$LIBGIT2INCLUDE")
}
INCLUDEPATH += $$LIBGIT2INCLUDE
win32 {
contains(QMAKE_TARGET.arch, x86_64) {
LIBGIT2LIB = "$$_PRO_FILE_PWD_/../libgit2/build64"
} else {
LIBGIT2LIB = "$$_PRO_FILE_PWD_/../libgit2/build32"
}
exists($$LIBGIT2LIB/git2.lib) {
message("found libgit2 library in $$LIBGIT2LIB")
} else {
error("libgit2 library not found in $$LIBGIT2LIB")
}
}
unix {
LIBGIT2LIB = $$_PRO_FILE_PWD_/../libgit2/build
macx {
exists($$LIBGIT2LIB/libgit2.dylib) {
message("found libgit2 library in $$LIBGIT2LIB")
} else {
error("libgit2 library not found in $$LIBGIT2LIB")
}
} else {
exists($$LIBGIT2LIB/libgit2.so) {
message("found libgit2 library in $$LIBGIT2LIB")
} else {
error("libgit2 library not found in $$LIBGIT2LIB")
}
}
}
LIBS += -L$$LIBGIT2LIB -lgit2