annotate Resources/CMake/GoogleTestConfiguration.cmake @ 841:89a593f66104 jpeg

fix windows build
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 03 Jun 2014 20:37:35 +0200
parents 92aa6df91c30
children 4b4ab35c04f5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
638
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 634
diff changeset
1 if (USE_GTEST_DEBIAN_SOURCE_PACKAGE)
157
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
bdc60d16cc98 improved cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
9
634
d775a3cb5a06 refactoring of CMake scripts
jodogne
parents: 553
diff changeset
10 elseif (STATIC_BUILD OR NOT USE_SYSTEM_GOOGLE_TEST)
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 SET(GTEST_SOURCES_DIR ${CMAKE_BINARY_DIR}/gtest-1.6.0)
411
5f6d75cd4b46 md5 of third party downlaods
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 382
diff changeset
12 DownloadPackage(
5f6d75cd4b46 md5 of third party downlaods
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 382
diff changeset
13 "4577b49f2973c90bf9ba69aa8166b786"
5f6d75cd4b46 md5 of third party downlaods
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 382
diff changeset
14 "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/gtest-1.6.0.zip"
553
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 411
diff changeset
15 "${GTEST_SOURCES_DIR}")
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 include_directories(
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 ${GTEST_SOURCES_DIR}/include
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 ${GTEST_SOURCES_DIR}
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 )
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 set(GTEST_SOURCES
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 ${GTEST_SOURCES_DIR}/src/gtest-all.cc
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 )
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 else()
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 include(FindGTest)
157
a63fb54819d7 gtest on debian sid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 135
diff changeset
28 if (NOT GTEST_FOUND)
a63fb54819d7 gtest on debian sid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 135
diff changeset
29 message(FATAL_ERROR "Unable to find GoogleTest")
a63fb54819d7 gtest on debian sid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 135
diff changeset
30 endif()
a63fb54819d7 gtest on debian sid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 135
diff changeset
31
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 include_directories(${GTEST_INCLUDE_DIRS})
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 link_libraries(${GTEST_LIBRARIES})
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 endif()