Revision: 6513
http://playerstage.svn.sourceforge.net/playerstage/?rev=6513&view=rev
Author: gbiggs
Date: 2008-06-10 01:04:27 -0700 (Tue, 10 Jun 2008)
Log Message:
-----------
Using new FindBoost in Cmake 2.6
Modified Paths:
--------------
code/player/trunk/client_libs/libplayerc++/CMakeLists.txt
Modified: code/player/trunk/client_libs/libplayerc++/CMakeLists.txt
===================================================================
--- code/player/trunk/client_libs/libplayerc++/CMakeLists.txt 2008-06-10
06:37:58 UTC (rev 6512)
+++ code/player/trunk/client_libs/libplayerc++/CMakeLists.txt 2008-06-10
08:04:27 UTC (rev 6513)
@@ -4,50 +4,106 @@
OPTION (BUILD_PLAYERCC_BOOST "Include Boost support in the C++ client library"
ON)
IF (BUILD_PLAYERCC)
# Look for Boost libraries
- SET (boostLinkLibs)
IF (BUILD_PLAYERCC_BOOST)
- FIND_PACKAGE (Boost)
- IF (Boost_FOUND)
- # TODO: there may be a new, much better, FindBoost.cmake coming in
2.6
- # For now, assume that if boost is found then both signals and
threads are present
- SET (HAVE_BOOST_THREAD TRUE INTERNAL)
- IF (HAVE_BOOST_THREAD)
- OPTION (USE_BOOST_THREADS "Use the Boost threading library" ON)
- MARK_AS_ADVANCED (USE_BOOST_THREADS)
- IF (USE_BOOST_THREADS)
- MESSAGE (STATUS "PlayerC++ client library will be built with
Boost::Thread support.")
- PLAYERCC_ADD_LINK_LIB (boost_thread)
- INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS})
- LINK_DIRECTORIES (${Boost_LIBRARY_DIRS})
- SET (boostLinkLibs "${boostLinkLibs} -lboost_thread")
- ELSE (USE_BOOST_THREADS)
- MESSAGE (STATUS "PlayerC++ client library Boost::Thread
support disabled by user.")
- ENDIF (USE_BOOST_THREADS)
- ELSE (HAVE_BOOST_THREAD)
- MESSAGE (STATUS "PlayerC++ client library Boost::Thread support
disabled - Boost::Thread library not found.")
- ENDIF (HAVE_BOOST_THREAD)
+ IF (CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4)
+ # There is a new, much better, FindBoost.cmake in 2.6 (see below)
+ FIND_PACKAGE (Boost)
+ IF (Boost_FOUND)
+ # For 2.4, assume that if boost is found then both signals and
threads are present
+ SET (HAVE_BOOST_THREAD TRUE INTERNAL)
+ IF (HAVE_BOOST_THREAD)
+ OPTION (USE_BOOST_THREAD "Use the Boost threading library"
ON)
+ MARK_AS_ADVANCED (USE_BOOST_THREAD)
+ IF (USE_BOOST_THREAD)
+ MESSAGE (STATUS
+ "PlayerC++ client library will be built with
Boost::Thread support.")
+ PLAYERCC_ADD_LINK_LIB (boost_thread)
+ INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS})
+ LINK_DIRECTORIES (${Boost_LIBRARY_DIRS})
+ SET (boostThreadLib -lboost_thread)
+ ELSE (USE_BOOST_THREAD)
+ MESSAGE (STATUS
+ "PlayerC++ client library Boost::Thread support
disabled by user.")
+ ENDIF (USE_BOOST_THREAD)
+ ELSE (HAVE_BOOST_THREAD)
+ MESSAGE (STATUS
+ "PlayerC++ client library Boost::Thread support
disabled -
+ Boost::Thread library not found.")
+ ENDIF (HAVE_BOOST_THREAD)
- SET (HAVE_BOOST_SIGNALS TRUE INTERNAL)
- IF (HAVE_BOOST_SIGNALS)
- OPTION (USE_BOOST_SIGNALS "Use the Boost signalling library" ON)
- MARK_AS_ADVANCED (USE_BOOST_SIGNALS)
- IF (USE_BOOST_SIGNALS)
- MESSAGE (STATUS "PlayerC++ client library will be built with
Boost::Signals support.")
- PLAYERCC_ADD_LINK_LIB (boost_signals)
- INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS})
- LINK_DIRECTORIES (${Boost_LIBRARY_DIRS})
- SET (boostLinkLibs "${boostLinkLibs} -lboost_signals")
- ELSE (USE_BOOST_SIGNALS)
- MESSAGE (STATUS "PlayerC++ client library Boost::Signals
support disabled by user.")
- ENDIF (USE_BOOST_SIGNALS)
- ELSE (HAVE_BOOST_SIGNALS)
- MESSAGE (STATUS "PlayerC++ client library Boost::Signals support
disabled - Boost::Signals library not found.")
- ENDIF (HAVE_BOOST_SIGNALS)
- ELSE (Boost_FOUND)
- MESSAGE (STATUS "Boost libraries were not found. Boost::Signals and
Boost::Thread support will not be included in PlayerC++.")
- ENDIF (Boost_FOUND)
+ SET (HAVE_BOOST_SIGNALS TRUE INTERNAL)
+ IF (HAVE_BOOST_SIGNALS)
+ OPTION (USE_BOOST_SIGNALS "Use the Boost signalling
library" ON)
+ MARK_AS_ADVANCED (USE_BOOST_SIGNALS)
+ IF (USE_BOOST_SIGNALS)
+ MESSAGE (STATUS
+ "PlayerC++ client library will be built with
Boost::Signals support.")
+ PLAYERCC_ADD_LINK_LIB (boost_signals)
+ INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS})
+ LINK_DIRECTORIES (${Boost_LIBRARY_DIRS})
+ SET (boostSignalsLib -lboost_signals)
+ ELSE (USE_BOOST_SIGNALS)
+ MESSAGE (STATUS
+ "PlayerC++ client library Boost::Signals
support disabled by
+ user.")
+ ENDIF (USE_BOOST_SIGNALS)
+ ELSE (HAVE_BOOST_SIGNALS)
+ MESSAGE (STATUS
+ "PlayerC++ client library Boost::Signals support
disabled -
+ Boost::Signals library not found.")
+ ENDIF (HAVE_BOOST_SIGNALS)
+ ELSE (Boost_FOUND)
+ MESSAGE (STATUS
+ "Boost libraries were not found. Boost::Signals and
Boost::Thread support
+ will not be included in PlayerC++.")
+ ENDIF (Boost_FOUND)
+ ELSE (CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4)
+ OPTION (Boost_USE_STATIC_LIBS "Use the static versions of the
Boost libraries" OFF)
+ OPTION (USE_BOOST_THREAD "Use the Boost threading library" ON)
+ MARK_AS_ADVANCED (USE_BOOST_THREAD)
+ OPTION (USE_BOOST_SIGNALS "Use the Boost signalling library" ON)
+ MARK_AS_ADVANCED (USE_BOOST_SIGNALS)
+
+ IF (USE_BOOST_THREAD)
+ SET (BOOST_COMPONENTS thread)
+ ENDIF (USE_BOOST_THREAD)
+ IF (USE_BOOST_SIGNALS)
+ SET (BOOST_COMPONENTS ${BOOST_COMPONENTS} signals)
+ ENDIF (USE_BOOST_SIGNALS)
+ FIND_PACKAGE (Boost COMPONENTS ${BOOST_COMPONENTS})
+ IF (Boost_FOUND)
+ INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIR})
+ LINK_DIRECTORIES (${Boost_LIBRARY_DIRS})
+
+ IF (Boost_thread_FOUND)
+ SET (boostThreadLib -lboost_thread)
+ PLAYERCC_ADD_LINK_LIB (boost_thread)
+ MESSAGE (STATUS
+ "PlayerC++ client library will be built with
Boost::Thread support.")
+ ELSE (Boost_thread_FOUND)
+ MESSAGE (STATUS
+ "Boost::Thread library not found, support will not
be included.")
+ ENDIF (Boost_thread_FOUND)
+
+ IF (Boost_signals_FOUND)
+ SET (boostSignalsLib -lboost_signals)
+ PLAYERCC_ADD_LINK_LIB (boost_signals)
+ MESSAGE (STATUS
+ "PlayerC++ client library will be built with
Boost::Signals support.")
+ ELSE (Boost_thread_FOUND)
+ MESSAGE (STATUS
+ "Boost::Signals library not found, support will
not be included.")
+ ENDIF (Boost_thread_FOUND)
+ ELSE (Boost_FOUND)
+ MESSAGE (STATUS
+ "Boost libraries were not found. Boost::Signals and
Boost::Thread support
+ will not be included in PlayerC++.")
+ ENDIF (Boost_FOUND)
+ ENDIF (CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4)
ELSE (BUILD_PLAYERCC_BOOST)
- MESSAGE (STATUS "Boost support disabled. Boost::Signals and
Boost::Thread support will not be included in PlayerC++.")
+ MESSAGE (STATUS
+ "Boost support disabled. Boost::Signals and Boost::Thread
support will not be
+ included in PlayerC++.")
ENDIF (BUILD_PLAYERCC_BOOST)
# Auto-generate playerc++config.h.
@@ -107,7 +163,9 @@
PLAYER_ADD_LIBRARY (playerc++ ${playerccSrcs} ${playercppconfig_h})
TARGET_LINK_LIBRARIES (playerc++ playerxdr playerutils playerc
${PLAYERCC_EXTRA_LINK_LIBRARIES})
- PLAYER_MAKE_PKGCONFIG ("playerc++" "C++ wrapper for libplayerc - part of
the Player Project" "playerxdr playerc" "" "" "-lm ${boostLinkLibs}")
+ PLAYER_MAKE_PKGCONFIG ("playerc++"
+ "C++ wrapper for libplayerc - part of the Player
Project"
+ "playerxdr playerc" "" "" "-lm ${boostThreadLib}
${boostSignalsLib}")
PLAYER_INSTALL_HEADERS (playerc++ ${playercppconfig_h}
clientproxy.h
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit