diff Resources/CMake/GoogleTestConfiguration.cmake @ 0:3959d33612cc

initial commit
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 19 Jul 2012 14:32:22 +0200
parents
children bdc60d16cc98
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Resources/CMake/GoogleTestConfiguration.cmake	Thu Jul 19 14:32:22 2012 +0200
@@ -0,0 +1,18 @@
+if (${STATIC_BUILD})
+  SET(GTEST_SOURCES_DIR ${CMAKE_BINARY_DIR}/gtest-1.6.0)
+  DownloadPackage("http://googletest.googlecode.com/files/gtest-1.6.0.zip" "${GTEST_SOURCES_DIR}" "" "")
+
+  include_directories(
+    ${GTEST_SOURCES_DIR}/include
+    ${GTEST_SOURCES_DIR}
+    )
+
+  set(GTEST_SOURCES
+    ${GTEST_SOURCES_DIR}/src/gtest-all.cc
+    )
+
+else()
+  include(FindGTest)
+  include_directories(${GTEST_INCLUDE_DIRS})
+  link_libraries(${GTEST_LIBRARIES})
+endif()