5958d7a5c4
- Apply upstream patch for urdfdom 0.3 support
45 lines
1.8 KiB
Diff
45 lines
1.8 KiB
Diff
diff -up ./cmake/sdf_config.h.in.urdfdom ./cmake/sdf_config.h.in
|
|
--- ./cmake/sdf_config.h.in.urdfdom 2014-08-22 21:07:12.473338538 -0400
|
|
+++ ./cmake/sdf_config.h.in 2014-08-22 21:07:34.382208622 -0400
|
|
@@ -26,7 +26,7 @@
|
|
#cmakedefine BUILD_TYPE_RELEASE 1
|
|
#cmakedefine HAVE_URDFDOM 1
|
|
#cmakedefine USE_EXTERNAL_URDF 1
|
|
-#cmakedefine URDF_GT_0P3 1
|
|
+#cmakedefine URDF_GE_0P3 1
|
|
|
|
#define SDF_SHARE_PATH "${CMAKE_INSTALL_PREFIX}/share/"
|
|
#define SDF_VERSION_PATH "${CMAKE_INSTALL_PREFIX}/share/sdformat/${SDF_PKG_VERSION}"
|
|
diff -up ./cmake/SearchForStuff.cmake.urdfdom ./cmake/SearchForStuff.cmake
|
|
--- ./cmake/SearchForStuff.cmake.urdfdom 2014-07-11 13:50:35.000000000 -0400
|
|
+++ ./cmake/SearchForStuff.cmake 2014-08-22 20:59:39.239507142 -0400
|
|
@@ -62,12 +62,25 @@ if (USE_EXTERNAL_URDF)
|
|
set (URDF_GE_0P3 TRUE)
|
|
endif()
|
|
|
|
- # what am I doing here? pkg-config and cmake
|
|
- set(URDF_INCLUDE_DIRS ${URDF_INCLUDEDIR})
|
|
- set(URDF_LIBRARY_DIRS ${URDF_LIBDIR})
|
|
endif()
|
|
endif()
|
|
|
|
+################################################
|
|
+# Find gtest
|
|
+find_package(GTest)
|
|
+if (USE_EXTERNAL_GTEST AND 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/
|