annotate Resources/CMake/GoogleTestConfiguration.cmake @ 382:b45bc565d82a lua-scripting

cmake for lua
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 29 Apr 2013 13:31:10 +0200
parents a63fb54819d7
children 5f6d75cd4b46
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
bdc60d16cc98 improved cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
9
bdc60d16cc98 improved cmake
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
10 elseif (STATIC_BUILD OR NOT USE_DYNAMIC_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)
382
b45bc565d82a cmake for lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 157
diff changeset
12 DownloadPackage("http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/gtest-1.6.0.zip" "${GTEST_SOURCES_DIR}" "" "")
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 include_directories(
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 ${GTEST_SOURCES_DIR}/include
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 ${GTEST_SOURCES_DIR}
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 )
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 set(GTEST_SOURCES
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 ${GTEST_SOURCES_DIR}/src/gtest-all.cc
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
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 else()
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 include_directories(${GTEST_INCLUDE_DIRS})
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 link_libraries(${GTEST_LIBRARIES})
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 endif()