Revision: 7647
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7647&view=rev
Author:   natepak
Date:     2009-05-13 20:18:10 +0000 (Wed, 13 May 2009)

Log Message:
-----------
Added configuration for freeimage

Modified Paths:
--------------
    code/gazebo/trunk/CMakeLists.txt
    code/gazebo/trunk/cmake/SearchForStuff.cmake
    code/gazebo/trunk/server/CMakeLists.txt
    code/gazebo/trunk/server/main.cc

Modified: code/gazebo/trunk/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/CMakeLists.txt    2009-05-13 17:57:48 UTC (rev 7646)
+++ code/gazebo/trunk/CMakeLists.txt    2009-05-13 20:18:10 UTC (rev 7647)
@@ -33,15 +33,11 @@
 
 # Write the config.h file
 CONFIGURE_FILE (${PROJECT_SOURCE_DIR}/config.h.in 
${PROJECT_BINARY_DIR}/config.h)
+INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})
 
-
 SET (gazebo_cmake_dir ${PROJECT_SOURCE_DIR}/cmake CACHE PATH 
      "Location of CMake scripts")
 
-SET (boost_include_dirs "" CACHE STRING "Boost include paths. Use this to 
override automatic detection.")
-SET (boost_library_dirs "" CACHE STRING "Boost library paths. Use this to 
override automatic detection.")
-SET (boost_libraries "" CACHE STRING "Boost libraries. Use this to override 
automatic detection.")
-
 #####################################
 # Build type cflags
 SET (CMAKE_C_FLAGS_RELEASE " -O3 -DNDEBUG -Wall " CACHE INTERNAL "C Flags for 
release" FORCE)

Modified: code/gazebo/trunk/cmake/SearchForStuff.cmake
===================================================================
--- code/gazebo/trunk/cmake/SearchForStuff.cmake        2009-05-13 17:57:48 UTC 
(rev 7646)
+++ code/gazebo/trunk/cmake/SearchForStuff.cmake        2009-05-13 20:18:10 UTC 
(rev 7647)
@@ -7,9 +7,18 @@
 SET (INCLUDE_WEBGAZEBO ON CACHE BOOL "Build webgazebo" FORCE)
 SET (OGRE_LIBRARY_PATH "/usr/local/lib" CACHE INTERNAL "Ogre library path")
 
+SET (freeimage_include_dir "/usr/include/" CACHE STRING "FreeImage include 
paths")
+SET (freeimage_library_dir "/usr/lib" CACHE STRING "FreeImage library paths")
+SET (freeimage_library "freeimage" CACHE STRING "FreeImage library")
+
+SET (boost_include_dirs "" CACHE STRING "Boost include paths. Use this to 
override automatic detection.")
+SET (boost_library_dirs "" CACHE STRING "Boost library paths. Use this to 
override automatic detection.")
+SET (boost_libraries "" CACHE STRING "Boost libraries. Use this to override 
automatic detection.")
+
 ########################################
 # Find packages
 IF (PKG_CONFIG_FOUND)
+
   pkg_check_modules(OGRE OGRE>=${OGRE_VERSION})
   IF (NOT OGRE_FOUND)
     MESSAGE (SEND_ERROR "\nError: Ogre3d and development files not found. See 
the following website: http://www.orge3d.org";)
@@ -209,8 +218,8 @@
 
 STRING(REGEX REPLACE "(^| )-L" " " boost_library_dirs "${boost_library_dirs}")
 STRING(REGEX REPLACE "(^| )-l" " " boost_libraries "${boost_libraries}")
-STRING(STRIP ${boost_library_dirs} boost_library_dirs)
-STRING(STRIP ${boost_libraries} boost_libraries)
+#STRING(STRIP ${boost_library_dirs} boost_library_dirs)
+#STRING(STRIP ${boost_libraries} boost_libraries)
 STRING(REGEX REPLACE " " ";" boost_libraries "${boost_libraries}")
 
 MESSAGE (STATUS "Boost Include Path: ${boost_include_dirs}")
@@ -218,6 +227,24 @@
 MESSAGE (STATUS "Boost Libraries: ${boost_libraries}")
 
 ########################################
+# Find freeimage
+FIND_PATH(freeimage_include_dir FreeImage.h ${freeimage_include_dir})
+IF (NOT freeimage_include_dir)
+  MESSAGE (STATUS "Looking for FreeImage.h - not found")
+  MESSAGE (FATAL_ERROR "Unable to find FreeImage.h")
+ELSE (NOT freeimage_include_dir)
+  MESSAGE (STATUS "Looking for FreeImage.h - found")
+ENDIF (NOT freeimage_include_dir)
+
+FIND_LIBRARY(freeimage_library freeimage ${freeimage_library_dir})
+IF (NOT freeimage_library)
+  MESSAGE (STATUS "Looking for libfreeimage - not found")
+  MESSAGE (FATAL_ERROR "Unable to find libfreeimage")
+ELSE (NOT freeimage_library)
+  MESSAGE (STATUS "Looking for libfreeimage - found")
+ENDIF (NOT freeimage_library)
+
+########################################
 # Find avformat and avcodec
 IF (INCLUDE_AV)
   SET (libavformat_search_path 

Modified: code/gazebo/trunk/server/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/server/CMakeLists.txt     2009-05-13 17:57:48 UTC (rev 
7646)
+++ code/gazebo/trunk/server/CMakeLists.txt     2009-05-13 20:18:10 UTC (rev 
7647)
@@ -1,17 +1,6 @@
 INCLUDE (${gazebo_cmake_dir}/GazeboUtils.cmake)
 
 
-########################################
-# All the library search paths
-ADD_SUBDIRECTORY(rendering)
-ADD_SUBDIRECTORY(physics)
-ADD_SUBDIRECTORY(sensors)
-ADD_SUBDIRECTORY(gui)
-ADD_SUBDIRECTORY(controllers)
-IF (INCLUDE_AV)
-  ADD_SUBDIRECTORY(audio_video)
-ENDIF (INCLUDE_AV)
-
 #${FLTK_INCLUDE_DIR}
 ########################################
 # Include all the search paths for headers
@@ -32,17 +21,30 @@
   sensors/ray
   ${gazeboserver_include_dirs}
   ${boost_include_dirs}
+  ${freeimage_include_dir}
 )
 
 LINK_DIRECTORIES(  
  ${CMAKE_BINARY_DIR}/libgazebo 
  ${boost_library_dirs} 
+ ${freeimage_library_dir}
  ${gazeboserver_link_dirs} 
  sensors
  controllers
 )
 
 ########################################
+# All the library search paths
+ADD_SUBDIRECTORY(rendering)
+ADD_SUBDIRECTORY(physics)
+ADD_SUBDIRECTORY(sensors)
+ADD_SUBDIRECTORY(gui)
+ADD_SUBDIRECTORY(controllers)
+IF (INCLUDE_AV)
+  ADD_SUBDIRECTORY(audio_video)
+ENDIF (INCLUDE_AV)
+
+########################################
 # Process all the subdirectories
 SET (sources Common.cc
              Vector3.cc 
@@ -101,7 +103,7 @@
     ${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE}})
 ENDIF (CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE})
 
-TARGET_LINK_LIBRARIES( gazebo-exec gazebo_gui gazebo_sensors gazebo_physics 
gazebo_rendering gazebo_controllers gazebo_av ${gazeboserver_link_libs} 
${FLTK_LIBRARIES} ${boost_libraries} gazebo )
+TARGET_LINK_LIBRARIES( gazebo-exec gazebo_gui gazebo_sensors gazebo_physics 
gazebo_rendering gazebo_controllers gazebo_av ${gazeboserver_link_libs} 
${FLTK_LIBRARIES} ${boost_libraries} ${freeimage_library} gazebo )
 
 INSTALL (TARGETS gazebo-exec DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
 INSTALL (FILES ${headers} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/gazebo 
COMPONENT headers)

Modified: code/gazebo/trunk/server/main.cc
===================================================================
--- code/gazebo/trunk/server/main.cc    2009-05-13 17:57:48 UTC (rev 7646)
+++ code/gazebo/trunk/server/main.cc    2009-05-13 20:18:10 UTC (rev 7647)
@@ -106,7 +106,7 @@
 #include <errno.h>
 #include <iostream>
 
-#include "config.h"
+#include <config.h>
 #include "Simulator.hh"
 #include "GazeboError.hh"
 #include "Global.hh"


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to