include_directories(
${CMAKE_BINARY_DIR}
${TOP_SRC_DIR}/src)
-
+
option(UseExternalBoost "Use external boost" OFF)
if(UseExternalBoost)
message(STATUS "Searching for boost")
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)
if(NOT use_external_libintl)
- add_subdirectory(intl)
+ add_subdirectory(intl)
endif()
add_subdirectory(src)
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}
)
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)
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)
${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")
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})