28 lines
1.2 KiB
Diff
28 lines
1.2 KiB
Diff
diff -up ./cmake/SearchForStuff.cmake.urdfdom ./cmake/SearchForStuff.cmake
|
|
--- ./cmake/SearchForStuff.cmake.urdfdom 2014-04-16 21:49:40.269514105 -0400
|
|
+++ ./cmake/SearchForStuff.cmake 2014-04-16 21:50:31.687724816 -0400
|
|
@@ -50,6 +50,22 @@ if (USE_EXTERNAL_URDF)
|
|
endif()
|
|
endif()
|
|
|
|
+################################################
|
|
+# Find gtest
|
|
+find_package(GTest)
|
|
+if (GTEST_FOUND)
|
|
+ set(GTEST_LIBRARY ${GTEST_LIBRARIES})
|
|
+ set(GTEST_MAIN_LIBRARY ${GTEST_MAIN_LIBRARIES})
|
|
+ set(GTEST_INCLUDE_DIR ${GTEST_INCLUDE_DIRS})
|
|
+else()
|
|
+ add_library(gtest STATIC "${PROJECT_SOURCE_DIR}/test/gtest/src/gtest-all.cc")
|
|
+ add_library(gtest_main STATIC "${PROJECT_SOURCE_DIR}/test/gtest/src/gtest_main.cc")
|
|
+ target_link_libraries(gtest_main gtest)
|
|
+ set(GTEST_LIBRARY "${PROJECT_BINARY_DIR}/test/libgtest.a")
|
|
+ set(GTEST_MAIN_LIBRARY "${PROJECT_BINARY_DIR}/test/libgtest_main.a")
|
|
+ set(GTEST_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/test/gtest/include")
|
|
+endif()
|
|
+
|
|
#################################################
|
|
# Macro to check for visibility capability in compiler
|
|
# Original idea from: https://gitorious.org/ferric-cmake-stuff/
|
|
diff -up ./src/CMakeLists.txt.urdfdom ./src/CMakeLists.txt
|