]> git.lyx.org Git - features.git/commitdiff
Cleanup Boost-Libraries use
authorKornel Benko <kornel@lyx.org>
Mon, 17 Aug 2009 21:27:56 +0000 (21:27 +0000)
committerKornel Benko <kornel@lyx.org>
Mon, 17 Aug 2009 21:27:56 +0000 (21:27 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31105 a592a061-630c-0410-9148-cb99ea01b6c8

development/cmake/CMakeLists.txt
development/cmake/src/client/CMakeLists.txt
development/cmake/src/frontends/CMakeLists.txt
development/cmake/src/support/CMakeLists.txt
development/cmake/src/tex2lyx/CMakeLists.txt

index dd335badbf0f6f71ea1751d95e56c3f8479606a7..50f38244d40420599ec032e4f1a63a428dac7ae6 100644 (file)
@@ -396,7 +396,7 @@ 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")
@@ -404,11 +404,13 @@ if(UseExternalBoost)
   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")
+  set(Lyx_Boost_Libraries boost_signals boost_regex)
   add_definitions(-DBOOST_USER_CONFIG="<config.h>")
   include_directories(${TOP_SRC_DIR}/boost)
   add_subdirectory(boost)
@@ -416,7 +418,7 @@ endif()
 
 
 if(NOT use_external_libintl)
-       add_subdirectory(intl)
+  add_subdirectory(intl)
 endif()
 add_subdirectory(src)
 
index d8b25d9136657b9e18bc071c89283d4db642cda7..3442a902e338db7318537ffc610bf951a6a6d8ef 100644 (file)
@@ -17,14 +17,9 @@ include_directories(BEFORE "${TOP_SRC_DIR}/src/client"
 
 add_executable(${_lyxclient} ${_lyxclient_sources} ${_lyxclient_headers})
 
-if(Boost_FOUND)
-  target_link_libraries(${_lyxclient} ${Boost_LIBRARIES})
-else()
-  target_link_libraries(${_lyxclient} boost_regex)
-endif()
-
 target_link_libraries(${_lyxclient}
        support
+       ${Lyx_Boost_Libraries}
        ${LIBINTL_LIBRARIES}
         ${ICONV_LIBRARY}
        ${QT_QTCORE_LIBRARY}
@@ -32,11 +27,11 @@ target_link_libraries(${_lyxclient}
        )
 
 if (ASPELL_FOUND)
-        target_link_libraries(${_lyxclient} ${ASPELL_LIBRARY})
+  target_link_libraries(${_lyxclient} ${ASPELL_LIBRARY})
 endif()
 
 if (APPLE)
-       target_link_libraries(${_lyxclient} "-framework Carbon")
+  target_link_libraries(${_lyxclient} "-framework Carbon")
 endif()
 
 install(TARGETS ${_lyxclient} DESTINATION bin)
index c8a2ee426d294a8710f3aca3f948d68ec9158e1c..a263e2ba384f79441431b3c9ff01be661f7651e9 100644 (file)
@@ -23,11 +23,7 @@ else()
        add_library(frontends ${library_type} ${_allinone_files})
 endif()
 
-if(Boost_FOUND)
-  target_link_libraries(frontends ${Boost_LIBRARIES})
-else()
-  target_link_libraries(frontends boost_regex)
-endif()
+target_link_libraries(frontends ${Lyx_Boost_Libraries})
 
 project_source_group("${GROUP_CODE}" frontends_sources frontends_headers)
 
index 78637c8c703310c65026c3db7b07bbc8fc699bbe..92af3dee7fbcda73eba654d67d60cfae043525f9 100644 (file)
@@ -61,13 +61,7 @@ else()
                ${support_mythes_sources} ${support_linkback_sources} ${support_headers} ${dont_merge})
 endif()
 
-if(Boost_FOUND)
-  target_link_libraries(support ${Boost_LIBRARIES})
-else()
-  target_link_libraries(support boost_signals boost_regex)
-endif()
-
-target_link_libraries(support ${QT_QTCORE_LIBRARY} ${ZLIB_LIBRARY})
+target_link_libraries(support ${Lyx_Boost_Libraries} ${QT_QTCORE_LIBRARY} ${ZLIB_LIBRARY})
 
 if(APPLE)
        target_link_libraries(support "objc" "-framework Appkit" "-framework CoreFoundation")
index 13857f9116b396939ae21527e3d9bd2aecef49ff..3d512f0b52eee84358c16bdccd72a759b061286f 100644 (file)
@@ -37,15 +37,9 @@ else()
        add_executable(${_tex2lyx} ${_allinone_files} ${_allinone_linked_files})
 endif()
 
-
-if(Boost_FOUND)
-  target_link_libraries(${_tex2lyx} ${Boost_LIBRARIES})
-else()
-  target_link_libraries(${_tex2lyx} boost_regex)
-endif()
-
 target_link_libraries(${_tex2lyx}
        support
+       ${Lyx_Boost_Libraries}
        ${QT_QTCORE_LIBRARY}
        ${LIBINTL_LIBRARIES}
        ${ICONV_LIBRARY})