From: <hsu...@us...> - 2009-06-03 00:56:32
|
Revision: 7762 http://playerstage.svn.sourceforge.net/playerstage/?rev=7762&view=rev Author: hsujohnhsu Date: 2009-06-03 00:56:24 +0000 (Wed, 03 Jun 2009) Log Message: ----------- udpate option to perform freeimage pkg-config search first. Modified Paths: -------------- code/gazebo/trunk/CMakeLists.txt code/gazebo/trunk/cmake/SearchForStuff.cmake Modified: code/gazebo/trunk/CMakeLists.txt =================================================================== --- code/gazebo/trunk/CMakeLists.txt 2009-06-03 00:12:24 UTC (rev 7761) +++ code/gazebo/trunk/CMakeLists.txt 2009-06-03 00:56:24 UTC (rev 7762) @@ -30,6 +30,7 @@ CACHE INTERNAL "Gazebo controller sources list description" FORCE) SET (OGRE_VERSION 1.6.1 CACHE INTERNAL "Ogre version requirement" FORCE) +SET (FREEIMAGE_VERSION 3.11.0 CACHE INTERNAL "FreeImage version requirement" FORCE) SET (ODE_VERSION 0.10.1 CACHE INTERNAL "ODE version requirement" FORCE) SET (MIN_BOOST_VERSION 1.35.0 CACHE INTERNAL "Boost min version requirement" FORCE) Modified: code/gazebo/trunk/cmake/SearchForStuff.cmake =================================================================== --- code/gazebo/trunk/cmake/SearchForStuff.cmake 2009-06-03 00:12:24 UTC (rev 7761) +++ code/gazebo/trunk/cmake/SearchForStuff.cmake 2009-06-03 00:56:24 UTC (rev 7762) @@ -62,6 +62,41 @@ ${ODE_LDFLAGS}) ENDIF (NOT ODE_FOUND) + pkg_check_modules(FI freeimage>=${FREEIMAGE_VERSION}) + IF (NOT FI_FOUND) + MESSAGE (STATUS "freeimage.pc not found, trying freeimage_include_dir and freeimage_library_dir flags.") + 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) + ELSE (NOT FI_FOUND) + APPEND_TO_CACHED_LIST(gazeboserver_include_dirs + ${gazeboserver_include_dirs_desc} + ${FI_INCLUDE_DIRS}) + APPEND_TO_CACHED_LIST(gazeboserver_link_dirs + ${gazeboserver_link_dirs_desc} + ${FI_LIBRARY_DIRS}) + APPEND_TO_CACHED_LIST(gazeboserver_link_libs + ${gazeboserver_link_libs_desc} + ${FI_LINK_LIBS}) + APPEND_TO_CACHED_LIST(gazeboserver_link_libs + ${gazeboserver_link_libs_desc} + ${FI_LIBRARIES}) + APPEND_TO_CACHED_LIST(gazeboserver_link_libs + ${gazeboserver_link_libs_desc} + ${FI_LDFLAGS}) + ENDIF (NOT FI_FOUND) + pkg_check_modules(XML libxml-2.0) IF (NOT XML_FOUND) MESSAGE (SEND_ERROR "\nError: libxml2 and development files not found. See the following website: http://www.xmlsoft.org") @@ -232,24 +267,6 @@ 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 (HAVE_FFMPEG) SET (libavformat_search_path This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |