1. OpenSourceRoboticsFoundation
  2. Simulation
  3. gazebo
  4. Issues
Issue #432 closed

Gazebo compilation broken without libgtest present

Jose Luis Rivero
created an issue

When performing a gazebo compilation in a clean system (minimal mandatory depedencies) without a libgtest-dev package installed, the compilation fails since a couple of CMakeLists.txt, into tests directories, lack of "include" directive for the embedded gtest version inside gazebo.

Attached is a patch for fixing this.

P.D: what about creating a jenkins for this kind of 'minimal dependencies' compilation?

Comments (6)

  1. Jose Luis Rivero reporter

    Ugh ... inline patch will be shown better:

    diff -r 3e5fb38a404e gazebo/msgs/test/CMakeLists.txt
    --- a/gazebo/msgs/test/CMakeLists.txt   Thu Jan 17 17:19:45 2013 -0800
    +++ b/gazebo/msgs/test/CMakeLists.txt   Tue Jan 22 17:24:18 2013 +0100
    @@ -2,6 +2,7 @@
     include_directories (
    +  ${PROJECT_SOURCE_DIR}/test/gtest/include
    diff -r 3e5fb38a404e tools/test/CMakeLists.txt
    --- a/tools/test/CMakeLists.txt Thu Jan 17 17:19:45 2013 -0800
    +++ b/tools/test/CMakeLists.txt Tue Jan 22 17:24:18 2013 +0100
    @@ -1,6 +1,7 @@
     include_directories (
    +  ${PROJECT_SOURCE_DIR}/test/gtest/include
  2. John Hsu

    There's another slightly related issue, gtest library is not specified as static or shared library. By default cmake builds static libraries, but if one accidentally sets BUILD_SHARED_LIBS=ON, then gazebo build fails, unless one modifies test CMakeLists.txt by adding STATIC:

    add_library(gtest STATIC gtest/src/gtest-all.cc)
    add_library(gtest_main STATIC gtest/src/gtest_main.cc)

    Given the dependencies are expecting libgtest*.a static libs, should we go ahead make the changes above?

  3. Log in to comment