From 786ec140f49a798633cf6b7dcd9a0c4680c83f5c Mon Sep 17 00:00:00 2001 From: Lu Wang Date: Tue, 14 Aug 2012 23:35:53 +0800 Subject: [PATCH] workaround of boost::system dependency --- CMakeLists.txt | 6 ++++-- src/util.h | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index af91052..e35c430 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ find_package(PkgConfig) pkg_check_modules(POPPLER REQUIRED poppler) include_directories(${POPPLER_INCLUDE_DIRS}) link_directories ( ${POPPLER_LIBRARY_DIRS} ) -find_package(Boost REQUIRED COMPONENTS program_options) +find_package(Boost REQUIRED COMPONENTS program_options filesystem) include_directories(${Boost_INCLUDE_DIRS}) link_directories ( ${Boost_LIBRARY_DIRS} ) include_directories(src) @@ -37,7 +37,9 @@ add_executable(pdf2htmlEX src/util.h src/config.h) -target_link_libraries(pdf2htmlEX poppler boost_program_options boost_filesystem) +#link boost::system temporarily... maybe a bug of boost +#target_link_libraries(pdf2htmlEX poppler boost_program_options boost_filesystem) +target_link_libraries(pdf2htmlEX poppler boost_program_options boost_filesystem boost_system) install (TARGETS pdf2htmlEX DESTINATION lib/pdf2htmlEX) install (PROGRAMS "bin/pdf2htmlEX" DESTINATION bin) diff --git a/src/util.h b/src/util.h index 90234fb..6356522 100644 --- a/src/util.h +++ b/src/util.h @@ -31,11 +31,11 @@ using std::copy; using boost::archive::iterators::base64_from_binary; using boost::archive::iterators::transform_width; -// mute gcc +// mute gcc warning of unused function namespace { template - void dummy1(){ auto _ = &mapUCS2; } + void dummy(){ auto _ = &mapUCS2; } } static inline bool _equal(double x, double y) { return std::abs(x-y) < EPS; }