1
# Orthanc - A Lightweight, RESTful DICOM Store
2
# Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics
3
# Department, University Hospital of Liege, Belgium
5
# This program is free software: you can redistribute it and/or
6
# modify it under the terms of the GNU Affero General Public License
7
# as published by the Free Software Foundation, either version 3 of
8
# the License, or (at your option) any later version.
10
# This program is distributed in the hope that it will be useful, but
11
# WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
# Affero General Public License for more details.
15
# You should have received a copy of the GNU Affero General Public License
16
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19
if (USE_GTEST_DEBIAN_SOURCE_PACKAGE)
20
set(GTEST_SOURCES /usr/src/gtest/src/gtest-all.cc)
21
include_directories(/usr/src/gtest)
23
if (NOT EXISTS /usr/include/gtest/gtest.h OR
24
NOT EXISTS ${GTEST_SOURCES})
25
message(FATAL_ERROR "Please install the libgtest-dev package")
28
elseif (STATIC_BUILD OR NOT USE_SYSTEM_GOOGLE_TEST)
29
set(GTEST_SOURCES_DIR ${CMAKE_BINARY_DIR}/gtest-1.7.0)
31
"2d6ec8ccdf5c46b05ba54a9fd1d130d7"
32
"http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/gtest-1.7.0.zip"
33
"${GTEST_SOURCES_DIR}")
36
${GTEST_SOURCES_DIR}/include
41
${GTEST_SOURCES_DIR}/src/gtest-all.cc
44
# https://code.google.com/p/googletest/issues/detail?id=412
45
if (MSVC) # VS2012 does not support tuples correctly yet
46
add_definitions(/D _VARIADIC_MAX=10)
52
message(FATAL_ERROR "Unable to find GoogleTest")
55
include_directories(${GTEST_INCLUDE_DIRS})
56
link_libraries(${GTEST_LIBRARIES})