forked from LibreService/my_rime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
opencc_patch
49 lines (44 loc) · 1.2 KB
/
opencc_patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ee08591..24da933 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -127,12 +127,23 @@ add_definitions(
-DPACKAGE_NAME="${PACKAGE_NAME}"
)
+# Reproducible build
+add_definitions(-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.)
+
+if (EMSCRIPTEN)
+ add_definitions(-I"${CMAKE_CURRENT_SOURCE_DIR}/../../../build/sysroot/usr/include")
+else()
+ add_definitions(-I"${CMAKE_CURRENT_SOURCE_DIR}/../../include")
+endif()
+
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
add_definitions(
-std=c++14
-Wall
)
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
+ if (NOT EMSCRIPTEN)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
+ endif ()
if (CMAKE_BUILD_TYPE MATCHES Debug)
add_definitions(-O0 -g3)
endif ()
@@ -196,9 +207,6 @@ endif()
######## Subdirectories
add_subdirectory(src)
-add_subdirectory(doc)
-add_subdirectory(data)
-add_subdirectory(test)
######## Testing
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c0a0b10..b8cdc73 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -184,5 +184,3 @@ if (ENABLE_BENCHMARK)
endif()
# Subdir
-
-add_subdirectory(tools)