Revision: 7785
http://playerstage.svn.sourceforge.net/playerstage/?rev=7785&view=rev
Author: hsujohnhsu
Date: 2009-06-05 04:30:10 +0000 (Fri, 05 Jun 2009)
Log Message:
-----------
some cmake fix for freeiamge etc.
Modified Paths:
--------------
code/gazebo/branches/bullet/CMakeLists.txt
code/gazebo/branches/bullet/cmake/SearchForStuff.cmake
Modified: code/gazebo/branches/bullet/CMakeLists.txt
===================================================================
--- code/gazebo/branches/bullet/CMakeLists.txt 2009-06-05 04:19:41 UTC (rev
7784)
+++ code/gazebo/branches/bullet/CMakeLists.txt 2009-06-05 04:30:10 UTC (rev
7785)
@@ -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/bullet/cmake/SearchForStuff.cmake
===================================================================
--- code/gazebo/branches/bullet/cmake/SearchForStuff.cmake 2009-06-05
04:19:41 UTC (rev 7784)
+++ code/gazebo/branches/bullet/cmake/SearchForStuff.cmake 2009-06-05
04:30:10 UTC (rev 7785)
@@ -36,6 +36,9 @@
APPEND_TO_CACHED_LIST(gazeboserver_link_libs
${gazeboserver_link_libs_desc}
${OGRE_LIBRARIES})
+ APPEND_TO_CACHED_LIST(gazeboserver_link_libs
+ ${gazeboserver_link_libs_desc}
+ ${OGRE_LDFLAGS})
ENDIF (NOT OGRE_FOUND)
pkg_check_modules(ODE ode>=${ODE_VERSION})
@@ -54,8 +57,50 @@
APPEND_TO_CACHED_LIST(gazeboserver_link_libs
${gazeboserver_link_libs_desc}
${ODE_LIBRARIES})
+ APPEND_TO_CACHED_LIST(gazeboserver_link_libs
+ ${gazeboserver_link_libs_desc}
+ ${ODE_LDFLAGS})
ENDIF (NOT ODE_FOUND)
+
+ MESSAGE(STATUS "pkg_config_path" ${PKG_CONFIG_PATH})
+
+ 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")
@@ -225,25 +270,7 @@
MESSAGE (STATUS "Boost Library Path: ${boost_library_dirs}")
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)
@@ -347,7 +374,7 @@
########################################
# Find bullet
-FIND_PATH( bullet_include_dir btBulletDynamicsCommon.h /usr/include
/usr/local/include ENV CPATH)
+FIND_PATH( bullet_include_dir btBulletDynamicsCommon.h ${bullet_include_dirs}
ENV CPATH)
IF (NOT bullet_include_dir)
MESSAGE (STATUS "Looking for btBulletDynamicsCommon.h - not found")
SET (bullet_include_dir /usr/include)
@@ -356,13 +383,13 @@
ENDIF (NOT bullet_include_dir)
FIND_LIBRARY(bullet_dynamics_library NAMES BulletDynamics
- PATHS /usr/lib /usr/local/lib ENV LD_LIBRARY_PATH)
+ PATHS ${bullet_dynamics_dirs} ENV LD_LIBRARY_PATH)
FIND_LIBRARY(bullet_collision_library NAMES BulletCollision
- PATHS /usr/lib /usr/local/lib ENV LD_LIBRARY_PATH)
+ PATHS ${bullet_collision_dirs} ENV LD_LIBRARY_PATH)
FIND_LIBRARY(bullet_softbody_library NAMES BulletSoftBody
- PATHS /usr/lib /usr/local/lib ENV LD_LIBRARY_PATH)
+ PATHS ${bullet_softbody_dirs} ENV LD_LIBRARY_PATH)
FIND_LIBRARY(bullet_math_library NAMES LinearMath
- PATHS /usr/lib /usr/local/lib ENV LD_LIBRARY_PATH)
+ PATHS ${bullet_math_dirs} ENV LD_LIBRARY_PATH)
IF (NOT bullet_dynamics_library OR
NOT bullet_collision_library OR
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