forked from cagnulein/qdomyos-zwift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgtest_dependency.pri
41 lines (33 loc) · 1.03 KB
/
gtest_dependency.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
isEmpty(GOOGLETEST_DIR):GOOGLETEST_DIR=$$(GOOGLETEST_DIR)
isEmpty(GOOGLETEST_DIR) {
GOOGLETEST_DIR =
!isEmpty(GOOGLETEST_DIR) {
warning("Using googletest src dir specified at Qt Creator wizard")
message("set GOOGLETEST_DIR as environment variable or qmake variable to get rid of this message")
}
}
!isEmpty(GOOGLETEST_DIR): {
GTEST_SRCDIR = $$GOOGLETEST_DIR/googletest
GMOCK_SRCDIR = $$GOOGLETEST_DIR/googlemock
} else: unix {
exists(/usr/src/gtest):GTEST_SRCDIR=/usr/src/gtest
exists(/usr/src/gmock):GMOCK_SRCDIR=/usr/src/gmock
!isEmpty(GTEST_SRCDIR): message("Using gtest from system")
}
requires(exists($$GTEST_SRCDIR):exists($$GMOCK_SRCDIR))
DEFINES += \
GTEST_LANG_CXX11
!isEmpty(GTEST_SRCDIR) {
INCLUDEPATH *= \
$$GTEST_SRCDIR \
$$GTEST_SRCDIR/include
SOURCES += \
$$GTEST_SRCDIR/src/gtest-all.cc
}
!isEmpty(GMOCK_SRCDIR) {
INCLUDEPATH *= \
$$GMOCK_SRCDIR \
$$GMOCK_SRCDIR/include
SOURCES += \
$$GMOCK_SRCDIR/src/gmock-all.cc
}