Revision: 7750
http://playerstage.svn.sourceforge.net/playerstage/?rev=7750&view=rev
Author: hsujohnhsu
Date: 2009-06-01 23:14:31 +0000 (Mon, 01 Jun 2009)
Log Message:
-----------
added option to search for freeimage.pc before using freeimage flags.
Modified Paths:
--------------
code/gazebo/branches/threads/CMakeLists.txt
code/gazebo/branches/threads/cmake/SearchForStuff.cmake
Modified: code/gazebo/branches/threads/CMakeLists.txt
===================================================================
--- code/gazebo/branches/threads/CMakeLists.txt 2009-06-01 09:30:31 UTC (rev
7749)
+++ code/gazebo/branches/threads/CMakeLists.txt 2009-06-01 23:14:31 UTC (rev
7750)
@@ -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/branches/threads/cmake/SearchForStuff.cmake
===================================================================
--- code/gazebo/branches/threads/cmake/SearchForStuff.cmake 2009-06-01
09:30:31 UTC (rev 7749)
+++ code/gazebo/branches/threads/cmake/SearchForStuff.cmake 2009-06-01
23:14:31 UTC (rev 7750)
@@ -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}
+ ${FREEIMAGE_INCLUDE_DIRS})
+ APPEND_TO_CACHED_LIST(gazeboserver_link_dirs
+ ${gazeboserver_link_dirs_desc}
+ ${FREEIMAGE_LIBRARY_DIRS})
+ APPEND_TO_CACHED_LIST(gazeboserver_link_libs
+ ${gazeboserver_link_libs_desc}
+ ${FREEIMAGE_LINK_LIBS})
+ APPEND_TO_CACHED_LIST(gazeboserver_link_libs
+ ${gazeboserver_link_libs_desc}
+ ${FREEIMAGE_LIBRARIES})
+ APPEND_TO_CACHED_LIST(gazeboserver_link_libs
+ ${gazeboserver_link_libs_desc}
+ ${FREEIMAGE_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.
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit