Mercurial > hg > orthanc
annotate Resources/CMake/GoogleTestConfiguration.cmake @ 2192:61ab5fa36754 Orthanc-0.5.1
hotfix in release 0.5.1 to properly download dependencies
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 02 Dec 2016 13:04:38 +0100 |
parents | a63fb54819d7 |
children |
rev | line source |
---|---|
157
a63fb54819d7
gtest on debian sid
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
135
diff
changeset
|
1 if (DEBIAN_USE_GTEST_SOURCE_PACKAGE) |
a63fb54819d7
gtest on debian sid
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
135
diff
changeset
|
2 set(GTEST_SOURCES /usr/src/gtest/src/gtest-all.cc) |
a63fb54819d7
gtest on debian sid
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
135
diff
changeset
|
3 include_directories(/usr/src/gtest) |
a63fb54819d7
gtest on debian sid
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
135
diff
changeset
|
4 |
a63fb54819d7
gtest on debian sid
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
135
diff
changeset
|
5 if (NOT EXISTS /usr/include/gtest/gtest.h OR |
a63fb54819d7
gtest on debian sid
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
135
diff
changeset
|
6 NOT EXISTS ${GTEST_SOURCES}) |
a63fb54819d7
gtest on debian sid
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
135
diff
changeset
|
7 message(FATAL_ERROR "Please install the libgtest-dev package") |
a63fb54819d7
gtest on debian sid
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
135
diff
changeset
|
8 endif() |
134 | 9 |
10 elseif (STATIC_BUILD OR NOT USE_DYNAMIC_GOOGLE_TEST) | |
0 | 11 SET(GTEST_SOURCES_DIR ${CMAKE_BINARY_DIR}/gtest-1.6.0) |
2192
61ab5fa36754
hotfix in release 0.5.1 to properly download dependencies
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
157
diff
changeset
|
12 DownloadPackage("http://www.orthanc-server.com/downloads/third-party/gtest-1.6.0.zip" "${GTEST_SOURCES_DIR}" "" "") |
0 | 13 |
14 include_directories( | |
15 ${GTEST_SOURCES_DIR}/include | |
16 ${GTEST_SOURCES_DIR} | |
17 ) | |
18 | |
19 set(GTEST_SOURCES | |
20 ${GTEST_SOURCES_DIR}/src/gtest-all.cc | |
21 ) | |
22 | |
23 else() | |
24 include(FindGTest) | |
157
a63fb54819d7
gtest on debian sid
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
135
diff
changeset
|
25 if (NOT GTEST_FOUND) |
a63fb54819d7
gtest on debian sid
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
135
diff
changeset
|
26 message(FATAL_ERROR "Unable to find GoogleTest") |
a63fb54819d7
gtest on debian sid
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
135
diff
changeset
|
27 endif() |
a63fb54819d7
gtest on debian sid
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
135
diff
changeset
|
28 |
0 | 29 include_directories(${GTEST_INCLUDE_DIRS}) |
30 link_libraries(${GTEST_LIBRARIES}) | |
31 endif() |