endif()
if(WIN32)
- find_library(HUNSPELL_LIBRARY "libhunspell")
+ find_library(HUNSPELL_LIBRARY "libhunspell")
else()
- find_library(HUNSPELL_LIBRARY "hunspell")
+ find_library(HUNSPELL_LIBRARY "hunspell")
endif()
if (HUNSPELL_LIBRARY)
- find_file(HUNSPELL_FOUND "hunspell/hunspell.hxx")
+ find_file(HUNSPELL_FOUND "hunspell/hunspell.hxx")
endif()
if (HUNSPELL_FOUND)
- add_definitions(-DUSE_HUNSPELL=1)
- message(STATUS "----- Building with USE_HUNSPELL")
+ add_definitions(-DUSE_HUNSPELL=1)
+ message(STATUS "----- Building with USE_HUNSPELL")
else()
- message(STATUS "----- Hunspell not found, building without hunspell support")
+ message(STATUS "----- Hunspell not found, building without hunspell support")
endif()
message(STATUS "")
message(STATUS "")
-add_definitions(-DBOOST_USER_CONFIG="<config.h>")
-
if(MSVC AND NOT disable-pch AND NOT MERGE_FILES)
message(STATUS "-----")
message(STATUS "----- using precompiled headers, disable with -Ddisable-pch=1")
find_package(ICONV REQUIRED)
add_definitions(-DHAVE_ICONV=1)
+
include_directories(
- ${CMAKE_BINARY_DIR}
- ${TOP_SRC_DIR}/src
- ${TOP_SRC_DIR}/boost)
+ ${CMAKE_BINARY_DIR}
+ ${TOP_SRC_DIR}/src)
+if(UseExternalBoost)
+ message(STATUS "Searching for boost")
+ find_package(Boost COMPONENTS signals regex)
+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)
+endif()
+
-add_subdirectory(boost)
if(NOT use_external_libintl)
add_subdirectory(intl)
endif()
${support_mythes_sources} ${support_linkback_sources} ${support_headers} ${dont_merge})
endif()
-target_link_libraries(support boost_signals ${QT_QTCORE_LIBRARY} ${ZLIB_LIBRARY})
+if(Boost_FOUND)
+ target_link_libraries(support ${Boost_LIBRARIES})
+else()
+ target_link_libraries(support boost_signals)
+endif()
+
+target_link_libraries(support ${QT_QTCORE_LIBRARY} ${ZLIB_LIBRARY})
if(APPLE)
target_link_libraries(support "objc" "-framework Appkit" "-framework CoreFoundation")