Revision: 7629
http://playerstage.svn.sourceforge.net/playerstage/?rev=7629&view=rev
Author: natepak
Date: 2009-05-08 21:09:56 +0000 (Fri, 08 May 2009)
Log Message:
-----------
Added options to manually specify boost paths
Modified Paths:
--------------
code/gazebo/trunk/CMakeLists.txt
code/gazebo/trunk/cmake/SearchForStuff.cmake
code/gazebo/trunk/libgazebo/CMakeLists.txt
code/gazebo/trunk/server/CMakeLists.txt
Modified: code/gazebo/trunk/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/CMakeLists.txt 2009-05-08 18:34:57 UTC (rev 7628)
+++ code/gazebo/trunk/CMakeLists.txt 2009-05-08 21:09:56 UTC (rev 7629)
@@ -27,38 +27,31 @@
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 -fPIC -Wall " CACHE INTERNAL "C
Flags for release" FORCE)
SET (CMAKE_C_FLAGS_DEBUG " -ggdb -fPIC " CACHE INTERNAL "C Flags fro debug"
FORCE)
SET (CMAKE_C_FLAGS_PROFILE " -ggdb -pg -fPIC " CACHE INTERNAL "C Flags for
profile" FORCE)
+#####################################
# Build type link flags
SET (CMAKE_LINK_FLAGS_RELEASE "" CACHE INTERNAL "Link flags fro release" FORCE)
SET (CMAKE_LINK_FLAGS_DEBUG "" CACHE INTERNAL "Link flags for debug" FORCE)
SET (CMAKE_LINK_FLAGS_PROFILE "" CACHE INTERNAL "Link flags for profile" FORCE)
-FIND_LIBRARY(PROFILER "profiler")
-IF (PROFILER)
- SET (CMAKE_LINK_FLAGS_PROFILE "${CMAKE_LINK_FLAGS_PROFILE} -lprofiler"
- CACHE INTERNAL "Link flags for profile" FORCE)
-ENDIF (PROFILER)
-
-FIND_LIBRARY(TCMALLOC "tcmalloc")
-IF (TCMALLOC)
- SET (CMAKE_LINK_FLAGS_PROFILE "${CMAKE_LINK_FLAGS_PROFILE} -ltcmalloc"
- CACHE INTERNAL "Link flags for profile" FORCE)
-ENDIF (TCMALLOC)
-
+#####################################
+# Set the default build type
IF (NOT CMAKE_BUILD_TYPE)
SET (CMAKE_BUILD_TYPE "release" CACHE STRING
"Choose the type of build, options are: debug release profile" FORCE)
ENDIF (NOT CMAKE_BUILD_TYPE)
-
STRING(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
-MESSAGE (STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
-
-
MESSAGE (STATUS "====== Finding 3rd Party Packages ======")
INCLUDE (${gazebo_cmake_dir}/SearchForStuff.cmake)
MESSAGE (STATUS "----------------------------------------")
@@ -75,3 +68,6 @@
IF (INCLUDE_WEBGAZEBO)
Add_SUBDIRECTORY(webgazebo)
ENDIF (INCLUDE_WEBGAZEBO)
+
+MESSAGE (STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
+MESSAGE (STATUS "Install path: ${CMAKE_INSTALL_PREFIX}")
Modified: code/gazebo/trunk/cmake/SearchForStuff.cmake
===================================================================
--- code/gazebo/trunk/cmake/SearchForStuff.cmake 2009-05-08 18:34:57 UTC
(rev 7628)
+++ code/gazebo/trunk/cmake/SearchForStuff.cmake 2009-05-08 21:09:56 UTC
(rev 7629)
@@ -1,7 +1,6 @@
INCLUDE (${gazebo_cmake_dir}/GazeboUtils.cmake)
INCLUDE (FindFLTK)
-INCLUDE (FindBoost)
INCLUDE (FindPkgConfig)
SET (INCLUDE_AV ON CACHE BOOL "Include audio/video functionality" FORCE)
@@ -178,13 +177,34 @@
########################################
-# Find Boost
-FIND_PACKAGE( Boost 1.34.1 COMPONENTS thread signals)
-IF (NOT Boost_FOUND)
- MESSAGE (FATAL_ERROR "Boost thread and signals not found")
- SET (BUILD_GAZEBO OFF CACHE BOOL "Build Gazebo" FORCE)
-ENDIF (NOT Boost_FOUND)
+# Find Boost, if not specified manually
+IF (NOT boost_include_dirs AND NOT boost_library_dirs AND NOT boost_libraries )
+ MESSAGE(STATUS "HERE")
+ INCLUDE (FindBoost)
+ FIND_PACKAGE( Boost 1.34.1 COMPONENTS thread signals)
+ IF (NOT Boost_FOUND)
+ MESSAGE (FATAL_ERROR "Boost thread and signals not found")
+ SET (BUILD_GAZEBO OFF CACHE BOOL "Build Gazebo" FORCE)
+ ENDIF (NOT Boost_FOUND)
+
+ LIST_TO_STRING(tmp "${Boost_INCLUDE_DIRS}")
+ SET (boost_include_dirs ${Boost_INCLUDE_DIRS} CACHE STRING
+ "Boost include paths. Use this to override automatic detection." FORCE)
+
+ LIST_TO_STRING(tmp "${Boost_LIBRARY_DIRS}")
+ SET (boost_library_dirs ${Boost_LIBRARY_DIRS} CACHE STRING
+ "Boost library paths. Use this to override automatic detection." FORCE)
+
+ LIST_TO_STRING(tmp "${Boost_LIBRARIES}")
+ SET (boost_libraries ${Boost_LIBRARIES} CACHE STRING
+ "Boost libraries. Use this to override automatic detection." FORCE)
+ENDIF (NOT boost_include_dirs AND NOT boost_library_dirs AND NOT
boost_libraries )
+
+MESSAGE (STATUS "Boost IDIRS ${boost_include_dirs}")
+MESSAGE (STATUS "Boost LDIRS ${boost_library_dirs}")
+MESSAGE (STATUS "Boost LIBS ${boost_libraries}")
+
########################################
# Find avformat and avcodec
IF (INCLUDE_AV)
@@ -240,3 +260,21 @@
ELSE (NOT LIBYAML_PATH)
MESSAGE (STATUS "Looking for yaml.h - found")
ENDIF (NOT LIBYAML_PATH)
+
+########################################
+# Find profiler library, optional
+FIND_LIBRARY(PROFILER "profiler")
+IF (PROFILER)
+ SET (CMAKE_LINK_FLAGS_PROFILE "${CMAKE_LINK_FLAGS_PROFILE} -lprofiler"
+ CACHE INTERNAL "Link flags for profile" FORCE)
+ENDIF (PROFILER)
+
+########################################
+# Find tcmalloc library, optional
+FIND_LIBRARY(TCMALLOC "tcmalloc")
+IF (TCMALLOC)
+ SET (CMAKE_LINK_FLAGS_PROFILE "${CMAKE_LINK_FLAGS_PROFILE} -ltcmalloc"
+ CACHE INTERNAL "Link flags for profile" FORCE)
+ENDIF (TCMALLOC)
+
+
Modified: code/gazebo/trunk/libgazebo/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/libgazebo/CMakeLists.txt 2009-05-08 18:34:57 UTC (rev
7628)
+++ code/gazebo/trunk/libgazebo/CMakeLists.txt 2009-05-08 21:09:56 UTC (rev
7629)
@@ -1,7 +1,29 @@
-INCLUDE (FindBoost)
+########################################
+# Find Boost, if not specified manually
+IF (NOT boost_include_dirs AND NOT boost_library_dirs AND NOT boost_libraries )
+ MESSAGE(STATUS "HERE")
+ INCLUDE (FindBoost)
+ FIND_PACKAGE( Boost 1.34.1 COMPONENTS thread signals)
+ IF (NOT Boost_FOUND)
+ MESSAGE (FATAL_ERROR "Boost thread and signals not found")
+ SET (BUILD_GAZEBO OFF CACHE BOOL "Build Gazebo" FORCE)
+ ENDIF (NOT Boost_FOUND)
-FIND_PACKAGE( Boost 1.34.1 COMPONENTS thread signals)
+ LIST_TO_STRING(tmp "${Boost_INCLUDE_DIRS}")
+ SET (boost_include_dirs ${Boost_INCLUDE_DIRS} CACHE STRING
+ "Boost include paths. Use this to override automatic detection." FORCE)
+
+ LIST_TO_STRING(tmp "${Boost_LIBRARY_DIRS}")
+ SET (boost_library_dirs ${Boost_LIBRARY_DIRS} CACHE STRING
+ "Boost library paths. Use this to override automatic detection." FORCE)
+
+ LIST_TO_STRING(tmp "${Boost_LIBRARIES}")
+ SET (boost_libraries ${Boost_LIBRARIES} CACHE STRING
+ "Boost libraries. Use this to override automatic detection." FORCE)
+ENDIF (NOT boost_include_dirs AND NOT boost_library_dirs AND NOT
boost_libraries )
+
+
SET (sources Server.cc
Client.cc
Iface.cc
@@ -13,7 +35,7 @@
SET (headers gazebo.h IfaceFactory.hh)
ADD_LIBRARY(gazeboshm SHARED ${sources})
-TARGET_LINK_LIBRARIES( gazeboshm ${Boost_LIBRARIES})
+TARGET_LINK_LIBRARIES( gazeboshm ${boost_libraries})
INSTALL (TARGETS gazeboshm DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
INSTALL (FILES ${headers} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/gazebo)
Modified: code/gazebo/trunk/server/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/server/CMakeLists.txt 2009-05-08 18:34:57 UTC (rev
7628)
+++ code/gazebo/trunk/server/CMakeLists.txt 2009-05-08 21:09:56 UTC (rev
7629)
@@ -20,14 +20,14 @@
${LIBAVCODEC_PATH}
${LIBAVFORMAT_PATH}
${FLTK_INCLUDE_DIR}
- ${Boost_INCLUDE_DIRS}
+ ${boost_include_dirs}
)
########################################
# All the library search paths
LINK_DIRECTORIES(
${CMAKE_SOURCE_DIR}/libgazebo
- ${Boost_LIBRARY_DIRS}
+ ${boost_library_dirs}
${gazeboserver_link_dirs}
)
@@ -88,7 +88,6 @@
ADD_EXECUTABLE(gazebo ${gazeboserver_sources} main.cc)
-APPEND_TO_CACHED_LIST(gazeboserver_cflags ${gazeboserver_cflags_desc}
"-fPIC;-Wall")
LIST_TO_STRING(GAZEBO_CFLAGS "${gazeboserver_cflags}")
SET_SOURCE_FILES_PROPERTIES(${gazeboserver_sources} PROPERTIES COMPILE_FLAGS
"${GAZEBO_CFLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}}")
@@ -97,7 +96,7 @@
SET_SOURCE_FILES_PROPERTIES(${gazeboserver_sources} PROPERTIES LINK_FLAGS
${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE}})
ENDIF (${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE}})
-TARGET_LINK_LIBRARIES( gazebo gazeboshm ${gazeboserver_link_libs}
${FLTK_LIBRARIES} ${Boost_LIBRARIES})
+TARGET_LINK_LIBRARIES( gazebo gazeboshm ${gazeboserver_link_libs}
${FLTK_LIBRARIES} ${boost_libraries})
INSTALL (TARGETS gazebo DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
INSTALL (FILES ${headers} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/gazebo
COMPONENT headers)
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