Revision: 9135
          http://sourceforge.net/p/playerstage/svn/9135
Author:   jpgr87
Date:     2013-11-11 02:31:39 +0000 (Mon, 11 Nov 2013)
Log Message:
-----------
Add explicit link to boost_system with boost_thread in boost versions greater 
than 1.49.  According to the Boost documentation, boost thread requires boost 
system as of 1.52, and the link was optional as of at least 1.50.  Adding the 
link explicitly should fix some build errors on newer distributions.

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   2013-11-11 
00:50:34 UTC (rev 9134)
+++ code/player/trunk/client_libs/libplayerc++/CMakeLists.txt   2013-11-11 
02:31:39 UTC (rev 9135)
@@ -33,7 +33,7 @@
             MARK_AS_ADVANCED (USE_BOOST_SIGNALS)
 
             IF (USE_BOOST_THREAD)
-                SET (BOOST_COMPONENTS thread)
+                SET (BOOST_COMPONENTS thread system)
             ELSE (USE_BOOST_THREAD)
                 SET (HAVE_BOOST_THREAD FALSE CACHE INTERNAL "Is the 
Boost::Thread library present")
             ENDIF (USE_BOOST_THREAD)
@@ -48,10 +48,20 @@
                 PLAYERCC_ADD_LINK_DIR (${Boost_LIBRARY_DIRS})
 
                 IF (Boost_THREAD_FOUND)
+                    # Thread Library
                     GET_FILENAME_COMPONENT (boostThreadLib 
"${Boost_THREAD_LIBRARY}" NAME_WE CACHE)
                     # Chop off the lib at the front, too, if present
                     STRING (REGEX REPLACE "^lib" "" boostThreadLib 
${boostThreadLib})
                     PLAYERCC_ADD_LINK_LIB (${boostThreadLib})
+
+                    # System Library
+                    if (Boost_SYSTEM_FOUND AND Boost_VERSION GREATER 104900)
+                        GET_FILENAME_COMPONENT (boostSystemLib 
${Boost_SYSTEM_LIBRARY} NAME_WE CACHE)
+                        # Chop off the lib at the front, too, if present
+                        STRING (REGEX REPLACE "^lib" "" boostSystemLib 
${boostSystemLib})
+                        PLAYERCC_ADD_LINK_LIB (${boostSystemLib})
+                    ENDIF (Boost_SYSTEM_FOUND AND Boost_VERSION GREATER 
104900) 
+
                     SET (boostIncludeDir ${Boost_INCLUDE_DIR})
                     SET (HAVE_BOOST_THREAD TRUE CACHE INTERNAL "Is the 
Boost::Thread library present")
                     MESSAGE (STATUS
@@ -107,6 +117,10 @@
                         PLAYERCC_ADD_INCLUDE_DIR (${Boost_INCLUDE_DIR})
                         PLAYERCC_ADD_LINK_DIR (${Boost_LIBRARY_DIRS})
                         SET (boostIncludeDir ${Boost_INCLUDE_DIRS})
+                        IF (Boost_VERSION GREATER 104900)
+                            SET (boostSystemLib 
boost_system${BOOST_LIB_SUFFIX})
+                            PLAYERCC_ADD_LINK_LIB(${boostSystemLib})
+                        ENDIF (Boost_VERSION GREATER 104900)
                     ELSE (USE_BOOST_THREAD)
                         SET (HAVE_BOOST_THREAD FALSE)
                         MESSAGE (STATUS

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to