Mercurial > hg > orthanc-webviewer
comparison Orthanc/Resources/CMake/GoogleTestConfiguration.cmake @ 25:15acbf5e7545
refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 02 Jun 2015 11:16:30 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
24:ed9acb0f938e | 25:15acbf5e7545 |
---|---|
1 if (USE_GTEST_DEBIAN_SOURCE_PACKAGE) | |
2 set(GTEST_SOURCES /usr/src/gtest/src/gtest-all.cc) | |
3 include_directories(/usr/src/gtest) | |
4 | |
5 if (NOT EXISTS /usr/include/gtest/gtest.h OR | |
6 NOT EXISTS ${GTEST_SOURCES}) | |
7 message(FATAL_ERROR "Please install the libgtest-dev package") | |
8 endif() | |
9 | |
10 elseif (STATIC_BUILD OR NOT USE_SYSTEM_GOOGLE_TEST) | |
11 set(GTEST_SOURCES_DIR ${CMAKE_BINARY_DIR}/gtest-1.7.0) | |
12 DownloadPackage( | |
13 "2d6ec8ccdf5c46b05ba54a9fd1d130d7" | |
14 "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/gtest-1.7.0.zip" | |
15 "${GTEST_SOURCES_DIR}") | |
16 | |
17 include_directories( | |
18 ${GTEST_SOURCES_DIR}/include | |
19 ${GTEST_SOURCES_DIR} | |
20 ) | |
21 | |
22 set(GTEST_SOURCES | |
23 ${GTEST_SOURCES_DIR}/src/gtest-all.cc | |
24 ) | |
25 | |
26 # https://code.google.com/p/googletest/issues/detail?id=412 | |
27 if (MSVC) # VS2012 does not support tuples correctly yet | |
28 add_definitions(/D _VARIADIC_MAX=10) | |
29 endif() | |
30 | |
31 else() | |
32 include(FindGTest) | |
33 if (NOT GTEST_FOUND) | |
34 message(FATAL_ERROR "Unable to find GoogleTest") | |
35 endif() | |
36 | |
37 include_directories(${GTEST_INCLUDE_DIRS}) | |
38 link_libraries(${GTEST_LIBRARIES}) | |
39 endif() |