+ if(APPLE)
+ message(FATAL_ERROR "Failed to find Boost libraries (Try to install them with 'sudo fink install boost1.53.nopython')")
+ else()
+ message(FATAL_ERROR "Failed to find Boost libraries."
+ "Did you install libboost-dev and libboost-context-dev?"
+ "(libboost-context-dev is optional)")
+ endif()
+endif()
+
+# Try again to see if we have libboost-context
+find_package(Boost 1.42 COMPONENTS context)
+set(Boost_FOUND 1) # We don't care of whether this component is missing
+
+if(Boost_FOUND AND Boost_CONTEXT_FOUND)
+ # We should use feature detection for this instead:
+ if (Boost_VERSION LESS 105600)
+ message("Found Boost.Context API v1")
+ set(HAVE_BOOST_CONTEXT 1)