Skip to content

Commit

Permalink
drop boost/signals
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj committed Oct 6, 2023
1 parent 6fa6902 commit 743f762
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 19 deletions.
7 changes: 0 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ option(BUILD_SAMPLE "Build sample Rime plugin" OFF)
option(BUILD_TEST "Build and run tests" ON)
option(BUILD_SEPARATE_LIBS "Build separate rime-* libraries" OFF)
option(ENABLE_LOGGING "Enable logging with google-glog library" ON)
option(BOOST_USE_SIGNALS2 "Boost use signals2 instead of signals" ON)
option(ENABLE_ASAN "Enable Address Sanitizer (Unix Only)" OFF)
option(INSTALL_PRIVATE_HEADERS "Install private headers (usually needed for externally built Rime plugins)" OFF)
option(ENABLE_EXTERNAL_PLUGINS "Enable loading of externally built Rime plugins (from directory set by RIME_PLUGINS_DIR variable)" OFF)
Expand Down Expand Up @@ -61,12 +60,6 @@ endif()

set(BOOST_COMPONENTS regex)

if(BOOST_USE_SIGNALS2)
set(RIME_BOOST_SIGNALS2 1)
else()
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} signals)
endif()

find_package(Boost 1.74.0 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ Follow the instructions to build librime on platforms other than Linux:

Build dependencies
---
- compiler with C++14 support
- cmake>=3.10
- compiler with C++17 support
- cmake>=3.12
- libboost>=1.74
- libglog (optional)
- libleveldb
Expand Down Expand Up @@ -81,6 +81,7 @@ Community:
- [Trime](https://github.com/osfans/trime): frontend for Android
- [XIME](https://github.com/stackia/XIME): frontend for macOS
- [My RIME](https://github.com/LibreService/my_rime): frontend for web
- [fcitx5-android](https://github.com/fcitx5-android/fcitx5-android): frontend for Android

Plugins
===
Expand Down
1 change: 0 additions & 1 deletion src/rime/build_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef RIME_BUILD_CONFIG_H_
#define RIME_BUILD_CONFIG_H_

#cmakedefine RIME_BOOST_SIGNALS2
#cmakedefine RIME_ENABLE_LOGGING

#cmakedefine RIME_DATA_DIR "@RIME_DATA_DIR@"
Expand Down
9 changes: 0 additions & 9 deletions src/rime/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@
#include <vector>
#include <boost/optional.hpp>
#define BOOST_BIND_NO_PLACEHOLDERS
#ifdef RIME_BOOST_SIGNALS2
#include <boost/signals2/connection.hpp>
#include <boost/signals2/signal.hpp>
#else
#include <boost/signals.hpp>
#endif

#ifdef RIME_ENABLE_LOGGING
#define GLOG_NO_ABBREVIATED_SEVERITIES
Expand Down Expand Up @@ -83,13 +79,8 @@ inline an<T> New(Args&&... args) {
return std::make_shared<T>(std::forward<Args>(args)...);
}

#ifdef RIME_BOOST_SIGNALS2
using boost::signals2::connection;
using boost::signals2::signal;
#else
using boost::signal;
using boost::signals::connection;
#endif

} // namespace rime

Expand Down

0 comments on commit 743f762

Please sign in to comment.