]> git.lyx.org Git - features.git/commitdiff
cmake: error when external boost is required but not found
authorPeter Kümmel <syntheticpp@gmx.net>
Mon, 17 Aug 2009 18:17:12 +0000 (18:17 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Mon, 17 Aug 2009 18:17:12 +0000 (18:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31096 a592a061-630c-0410-9148-cb99ea01b6c8

development/cmake/CMakeLists.txt

index c6b995170fb1778d4e0e0fa40f0658eb48652f9e..dd335badbf0f6f71ea1751d95e56c3f8479606a7 100644 (file)
@@ -396,18 +396,19 @@ add_definitions(-DHAVE_ICONV=1)
 include_directories(
   ${CMAKE_BINARY_DIR}
   ${TOP_SRC_DIR}/src)
+  
+option(UseExternalBoost "Use external boost" OFF)
 if(UseExternalBoost)
   message(STATUS "Searching for boost")
   find_package(Boost COMPONENTS signals regex)
+  if(Boost_FOUND)
+    message(STATUS "Boost found")
+    message(STATUS "Boost-libs = ${Boost_LIBRARIES}")
+  else()
+    message(FATAL_ERROR "Boost not found" ${Boost_ERROR_REASON})
+  endif()
 else()
   message(STATUS "----- Using internal boost. To build with installed version use -DUseExternalBoost:BOOL=ON")
-endif()
-
-if(Boost_FOUND)
-  message(STATUS "Boost found")
-  message(STATUS "Boost-libs = ${Boost_LIBRARIES}")
-else()
-  message(STATUS "Boost not found" ${Boost_ERROR_REASON})
   add_definitions(-DBOOST_USER_CONFIG="<config.h>")
   include_directories(${TOP_SRC_DIR}/boost)
   add_subdirectory(boost)