]> git.lyx.org Git - lyx.git/blobdiff - development/cmake/CMakeLists.txt
server_monitor.h must be included last for msvc sake.
[lyx.git] / development / cmake / CMakeLists.txt
index c6b995170fb1778d4e0e0fa40f0658eb48652f9e..50f38244d40420599ec032e4f1a63a428dac7ae6 100644 (file)
@@ -396,18 +396,21 @@ 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}")
+    set(Lyx_Boost_Libraries ${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})
+  set(Lyx_Boost_Libraries boost_signals boost_regex)
   add_definitions(-DBOOST_USER_CONFIG="<config.h>")
   include_directories(${TOP_SRC_DIR}/boost)
   add_subdirectory(boost)
@@ -415,7 +418,7 @@ endif()
 
 
 if(NOT use_external_libintl)
-       add_subdirectory(intl)
+  add_subdirectory(intl)
 endif()
 add_subdirectory(src)