Index: RDKit_2012_09_1/Code/JavaWrappers/gmwrapper/CMakeLists.txt
===================================================================
--- RDKit_2012_09_1/Code/JavaWrappers/gmwrapper/CMakeLists.txt	(revision 2268)
+++ RDKit_2012_09_1/Code/JavaWrappers/gmwrapper/CMakeLists.txt	(working copy)
@@ -74,7 +74,11 @@
 
 SWIG_ADD_MODULE(GraphMolWrap "java" GraphMolJava.i )
 
-SWIG_LINK_LIBRARIES(GraphMolWrap ${RDKit_Wrapper_Libs} )
+# it doesnt seem like the threading libs should need to be here, but
+# as of Oct 2012 using boost 1.51 under at least ubuntu 12.04 we get a
+# link error if they aren't there.
+SWIG_LINK_LIBRARIES(GraphMolWrap ${RDKit_Wrapper_Libs}
+      ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} )
 
 # code adapted from the wrapper code for
 # GDCM: http://gdcm.svn.sf.net/viewvc/gdcm/trunk/Wrapping/Java/CMakeLists.txt?view=markup
Index: RDKit_2012_09_1/Code/GraphMol/CMakeLists.txt
===================================================================
--- RDKit_2012_09_1/Code/GraphMol/CMakeLists.txt	(revision 2268)
+++ RDKit_2012_09_1/Code/GraphMol/CMakeLists.txt	(working copy)
@@ -5,7 +5,9 @@
               AtomIterators.cpp BondIterators.cpp Aromaticity.cpp Kekulize.cpp 
               MolDiscriminators.cpp ConjugHybrid.cpp AddHs.cpp RankAtoms.cpp 
               Matrices.cpp Chirality.cpp RingInfo.cpp Conformer.cpp
-              SHARED LINK_LIBRARIES RDGeometryLib RDGeneral)
+              SHARED 
+              LINK_LIBRARIES RDGeometryLib RDGeneral 
+                 ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
 
 rdkit_headers(Atom.h
               atomic_data.h
Index: RDKit_2012_09_1/CMakeLists.txt
===================================================================
--- RDKit_2012_09_1/CMakeLists.txt	(revision 2268)
+++ RDKit_2012_09_1/CMakeLists.txt	(working copy)
@@ -146,11 +146,10 @@
 
 if(RDK_TEST_MULTITHREADED)
   ADD_DEFINITIONS("-DRDK_TEST_MULTITHREADED")
-  find_package(Boost 1.39.0 COMPONENTS thread REQUIRED)
-else()
-  set(Boost_THREAD_LIBRARY )
 endif()
 
+find_package(Boost 1.39.0 COMPONENTS thread system REQUIRED)
+find_package (Threads)
 
 # setup our compiler flags:
 if(CMAKE_COMPILER_IS_GNUCXX)
