diff -up ./cmake/SearchForStuff.cmake.fedora ./cmake/SearchForStuff.cmake
--- ./cmake/SearchForStuff.cmake.fedora 2016-07-13 20:31:07.000000000 -0400
+++ ./cmake/SearchForStuff.cmake 2016-07-17 18:20:33.209143562 -0400
@@ -450,6 +450,13 @@ if (PKG_CONFIG_FOUND)
endif ()
########################################
+ # Find SkyX
+ pkg_check_modules(SKYX SKYX)
+ if (NOT SKYX_FOUND)
+ BUILD_WARNING("SkyX not found, using private copy of SkyX")
+ endif()
+
+ ########################################
# Find Player
pkg_check_modules(PLAYER playercore>=3.0 playerc++ playerwkb)
if (NOT PLAYER_FOUND)
diff -up ./gazebo/rendering/Camera.cc.fedora ./gazebo/rendering/Camera.cc
--- ./gazebo/rendering/Camera.cc.fedora 2016-07-13 20:31:08.000000000 -0400
+++ ./gazebo/rendering/Camera.cc 2016-07-17 18:20:33.210143600 -0400
@@ -36,7 +36,7 @@
// Moved to top to avoid osx compilation errors
#include "gazebo/math/Rand.hh"
-#include "gazebo/rendering/skyx/include/SkyX.h"
+#include "SkyX.h"
#include "gazebo/common/Assert.hh"
#include "gazebo/common/Events.hh"
diff -up ./gazebo/rendering/CMakeLists.txt.fedora ./gazebo/rendering/CMakeLists.txt
--- ./gazebo/rendering/CMakeLists.txt.fedora 2016-07-13 20:31:08.000000000 -0400
+++ ./gazebo/rendering/CMakeLists.txt 2016-07-17 18:23:58.644086518 -0400
@@ -3,10 +3,13 @@ include (${gazebo_cmake_dir}/GazeboUtils
include_directories(SYSTEM
${OGRE_INCLUDE_DIRS}
${TBB_INCLUDEDIR}
- skyx
- skyx/include
)
+if (SKYX_FOUND)
+ include_directories(SYSTEM ${SKYX_INCLUDE_DIRS})
+else()
+ include_directories(skyx skyx/include)
+endif()
if (WIN32)
include_directories(${libdl_include_dir})
@@ -133,7 +136,10 @@ if (${OGRE_VERSION} VERSION_GREATER 1.7.
endif()
add_subdirectory(selection_buffer)
+
+if (NOT SKYX_FOUND)
add_subdirectory(skyx)
+endif()
if (HAVE_OCULUS)
set (sources ${sources}
@@ -196,6 +202,10 @@ target_link_libraries(gazebo_rendering
${tinyxml_LIBRARIES}
)
+if (SKYX_FOUND)
+ target_link_libraries(gazebo_rendering ${SKYX_LIBRARIES})
+endif()
+
if (HAVE_OCULUS)
target_link_libraries(gazebo_rendering ${OculusVR_LIBRARIES})
endif()