File tree 5 files changed +27
-4
lines changed
5 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ endif()
61
61
set (BOOST_COMPONENTS filesystem regex system )
62
62
63
63
if (BOOST_USE_SIGNALS2)
64
- add_definitions ( "-DBOOST_SIGNALS2" )
64
+ set (RIME_BOOST_SIGNALS2 1 )
65
65
else ()
66
66
set (BOOST_COMPONENTS ${BOOST_COMPONENTS} signals)
67
67
endif ()
@@ -89,7 +89,7 @@ if(ENABLE_LOGGING)
89
89
add_definitions (-DGOOGLE_GLOG_DLL_DECL=)
90
90
endif ()
91
91
92
- add_definitions (-DRIME_ENABLE_LOGGING )
92
+ set (RIME_ENABLE_LOGGING 1 )
93
93
94
94
endif ()
95
95
@@ -134,6 +134,11 @@ else()
134
134
message (WARNING "X11/keysym.h not found." )
135
135
endif ()
136
136
137
+ configure_file (
138
+ "${PROJECT_SOURCE_DIR} /src/rime/build_config.h.in"
139
+ "${PROJECT_BINARY_DIR} /src/rime/build_config.h" )
140
+
141
+ include_directories (${PROJECT_BINARY_DIR} /src)
137
142
include_directories (${PROJECT_SOURCE_DIR} /src)
138
143
include_directories (${PROJECT_SOURCE_DIR} /thirdparty/include )
139
144
link_directories (${PROJECT_SOURCE_DIR} /thirdparty/lib)
Original file line number Diff line number Diff line change
1
+ //
2
+ // Copyright RIME Developers
3
+ // Distributed under the BSD License
4
+ //
5
+ #ifndef RIME_BUILD_CONFIG_H_
6
+ #define RIME_BUILD_CONFIG_H_
7
+
8
+ #cmakedefine RIME_BOOST_SIGNALS2
9
+ #cmakedefine RIME_ENABLE_LOGGING
10
+
11
+ #endif // RIME_BUILD_CONFIG_H_
Original file line number Diff line number Diff line change 7
7
#ifndef RIME_COMMON_H_
8
8
#define RIME_COMMON_H_
9
9
10
+ #include < rime/build_config.h>
11
+
10
12
#include < functional>
11
13
#include < list>
12
14
#include < map>
20
22
#include < vector>
21
23
#include < boost/optional.hpp>
22
24
#define BOOST_BIND_NO_PLACEHOLDERS
23
- #ifdef BOOST_SIGNALS2
25
+ #ifdef RIME_BOOST_SIGNALS2
24
26
#include < boost/signals2/connection.hpp>
25
27
#include < boost/signals2/signal.hpp>
26
28
#else
@@ -79,7 +81,7 @@ inline an<T> New(Args&&... args) {
79
81
return std::make_shared<T>(std::forward<Args>(args)...);
80
82
}
81
83
82
- #ifdef BOOST_SIGNALS2
84
+ #ifdef RIME_BOOST_SIGNALS2
83
85
using boost::signals2::connection;
84
86
using boost::signals2::signal;
85
87
#else
Original file line number Diff line number Diff line change 4
4
//
5
5
// 2011-12-10 GONG Chen <chen.sst@gmail.com>
6
6
//
7
+
8
+ #include < rime/build_config.h>
9
+
7
10
#include < algorithm>
8
11
#include < boost/algorithm/string.hpp>
9
12
#include < boost/filesystem.hpp>
Original file line number Diff line number Diff line change 5
5
// 2011-10-02 GONG Chen <chen.sst@gmail.com>
6
6
//
7
7
8
+ #include < rime/build_config.h>
9
+
8
10
#ifdef RIME_ENABLE_LOGGING
9
11
#include < glog/logging.h>
10
12
#endif // RIME_ENABLE_LOGGING
You can’t perform that action at this time.
0 commit comments