File: ced.patch

package info (click to toggle)
performous 1.3.1%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 63,368 kB
  • sloc: cpp: 35,854; sh: 927; python: 631; xml: 480; makefile: 37
file content (90 lines) | stat: -rw-r--r-- 3,387 bytes parent folder | download
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
From: Markus Koschany <apo@debian.org>
Date: Sun, 3 Sep 2023 15:30:53 +0200
Subject: ced

Forwarded: not-needed
---
 CMakeLists.txt      |  3 +++
 ced/CMakeLists.txt  | 29 -----------------------------
 game/CMakeLists.txt |  4 +++-
 game/unicode.cc     |  2 +-
 4 files changed, 7 insertions(+), 31 deletions(-)

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,6 +106,9 @@ else()
 	message(STATUS "Localization disabled: Gettext tools (msgfmt) missing")
 endif()
 
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ced)
+add_subdirectory(ced)
+
 add_subdirectory(data)
 
 add_subdirectory(game)
--- a/ced/CMakeLists.txt
+++ b/ced/CMakeLists.txt
@@ -72,32 +72,3 @@ target_include_directories(ced PUBLIC ${
 # Uncomment to put CED into WHATWG-compliant mode.
 #add_definitions(-DHTML5_MODE)
 
-set(GTEST_INCLUDE_DIR "gtest/googletest/include")
-set(GTEST_LIB_DIR "${CMAKE_SOURCE_DIR}/gtest/lib")
-
-set(CED_UNITTEST_SOURCES
-    compact_enc_det/compact_enc_det_unittest.cc
-    compact_enc_det/compact_enc_det_fuzz_test.cc
-    compact_enc_det/detail_head_string.inc
-    util/encodings/encodings_unittest.cc
-    )
-
-add_executable(ced_unittest ${CED_UNITTEST_SOURCES})
-include_directories(${CMAKE_SOURCE_DIR}/${GTEST_INCLUDE_DIR})
-if (WIN32)
-  set(GTEST_LIB_DIR_DBG "${GTEST_LIB_DIR}/Debug")
-  set(GTEST_LIB_DIR_REL "${GTEST_LIB_DIR}/Release")
-  target_link_libraries(ced_unittest
-                        ced
-                        debug ${GTEST_LIB_DIR_DBG}/gtest.lib optimized ${GTEST_LIB_DIR_REL}/gtest.lib
-                        debug ${GTEST_LIB_DIR_DBG}/gtest_main.lib optimized ${GTEST_LIB_DIR_REL}/gtest_main.lib
-                        ${EXTRA_TARGET_LINK_LIBRARIES})
-  message("\nConfiguration completed.  Open the created projects with Visual Studio to build the packages.\n")
-else()
-  target_link_libraries(ced_unittest
-                        ced
-                        ${GTEST_LIB_DIR}/libgtest.a
-                        ${GTEST_LIB_DIR}/libgtest_main.a
-                        ${EXTRA_TARGET_LINK_LIBRARIES}
-                        )
-endif()
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -134,7 +134,7 @@ if (MINGW)
 	target_link_libraries(performous PRIVATE mingw32)
 endif()
 
-foreach(lib ${OUR_LIBS} SDL2 PangoCairo LibRSVG LibXML++ AVFormat SWResample SWScale ZLIB JPEG PNG PortAudio Fontconfig GLM Json Ced Aubio)
+foreach(lib ${OUR_LIBS} SDL2 PangoCairo LibRSVG LibXML++ AVFormat SWResample SWScale ZLIB JPEG PNG PortAudio Fontconfig GLM Json Aubio)
 	find_package(${lib} ${${lib}_REQUIRED_VERSION} REQUIRED)
 	message(STATUS "${lib} includes: ${${lib}_INCLUDE_DIRS}")
 	target_include_directories(performous SYSTEM PRIVATE ${${lib}_INCLUDE_DIRS})
@@ -142,6 +142,8 @@ foreach(lib ${OUR_LIBS} SDL2 PangoCairo
 	add_definitions(${${lib}_DEFINITIONS})
 endforeach(lib)
 
+target_link_libraries(performous PRIVATE ced)
+
 find_package(fmt REQUIRED CONFIG)
 # CppRESTSDK and their godforsaken U macro.
 if(fmt_VERSION VERSION_GREATER_EQUAL 9.0.0)
--- a/game/unicode.cc
+++ b/game/unicode.cc
@@ -8,7 +8,7 @@
 #include <unicode/unistr.h>
 #include <unicode/ustream.h>
 #include <unicode/ubidi.h>
-#include "compact_enc_det/compact_enc_det.h"
+#include "../ced/compact_enc_det/compact_enc_det.h"
 
 std::unique_ptr<icu::RuleBasedCollator> UnicodeUtil::m_searchCollator;
 std::unique_ptr<icu::RuleBasedCollator> UnicodeUtil::m_sortCollator;