diff --git a/CMakeLists.txt b/CMakeLists.txt
index 80504c2f256a6b9eb68ece2a569a1bad158c3af0..5843b0f1027b30ad9f484a62774fcc818bbf7699 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -134,32 +134,8 @@ file(MAKE_DIRECTORY ${STAGE_DIR}
 setup_compiler_flags()
 
 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
-set(_BOOST_MIN_VERSION 1.37)
-
-find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS python REQUIRED)
-set(BOOST_PYTHON_LIBRARIES ${Boost_LIBRARIES})
-set(Boost_LIBRARIES)
-find_package(Boost ${_BOOST_MIN_VERSION} 
-             COMPONENTS unit_test_framework REQUIRED)
-set(BOOST_UNIT_TEST_LIBRARIES ${Boost_LIBRARIES})
-set(Boost_LIBRARIES)
-if (ENABLE_STATIC)
-  set(Boost_USE_STATIC_LIBS ON)
-endif()
-find_package(Boost ${_BOOST_MIN_VERSION} 
-             COMPONENTS filesystem system REQUIRED)
-set(BOOST_LIBRARIES ${Boost_LIBRARIES})
-set(Boost_LIBRARIES)
-find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS iostreams REQUIRED)
-set(BOOST_IOSTREAM_LIBRARIES ${Boost_LIBRARIES})
-set(Boost_LIBRARIES)
-find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS program_options REQUIRED)
-set(BOOST_PROGRAM_OPTIONS ${Boost_LIBRARIES})
-set(Boost_LIBRARIES)
-find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS regex REQUIRED)
-set(BOOST_REGEX_LIBRARIES ${Boost_LIBRARIES})
-set(Boost_LIBRARIES)
 
+setup_boost()
         
 find_package(Qt4 4.5.0 REQUIRED)
 find_package(OpenGL REQUIRED)
diff --git a/cmake_support/OST.cmake b/cmake_support/OST.cmake
index dd8c3c53d8892156740d52b1848f4f05b88047eb..c630e8b445ff3d0115e73a6a130a5738ae02ba7e 100644
--- a/cmake_support/OST.cmake
+++ b/cmake_support/OST.cmake
@@ -762,3 +762,30 @@ macro(setup_compiler_flags)
     endif()
   endif()
 endmacro()
+set(_BOOST_MIN_VERSION 1.37)
+
+macro(setup_boost)
+  find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS python REQUIRED)
+  set(BOOST_PYTHON_LIBRARIES ${Boost_LIBRARIES})
+  set(Boost_LIBRARIES)
+  find_package(Boost ${_BOOST_MIN_VERSION}
+               COMPONENTS unit_test_framework REQUIRED)
+  set(BOOST_UNIT_TEST_LIBRARIES ${Boost_LIBRARIES})
+  set(Boost_LIBRARIES)
+  if (ENABLE_STATIC)
+    set(Boost_USE_STATIC_LIBS ON)
+  endif()
+  find_package(Boost ${_BOOST_MIN_VERSION}
+               COMPONENTS filesystem system REQUIRED)
+  set(BOOST_LIBRARIES ${Boost_LIBRARIES})
+  set(Boost_LIBRARIES)
+  find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS iostreams REQUIRED)
+  set(BOOST_IOSTREAM_LIBRARIES ${Boost_LIBRARIES})
+  set(Boost_LIBRARIES)
+  find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS program_options REQUIRED)
+  set(BOOST_PROGRAM_OPTIONS ${Boost_LIBRARIES})
+  set(Boost_LIBRARIES)
+  find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS regex REQUIRED)
+  set(BOOST_REGEX_LIBRARIES ${Boost_LIBRARIES})
+  set(Boost_LIBRARIES)
+endmacro()