Add libprisma from Fela for syntax highlighting.

This commit is contained in:
John Preston 2023-10-04 16:23:19 +04:00
parent 396c229a4d
commit da768ac1d1
6 changed files with 52 additions and 1 deletions

3
.gitmodules vendored
View File

@ -100,3 +100,6 @@
[submodule "Telegram/ThirdParty/wayland"]
path = Telegram/ThirdParty/wayland
url = https://github.com/gitlab-freedesktop-mirrors/wayland.git
[submodule "Telegram/ThirdParty/libprisma"]
path = Telegram/ThirdParty/libprisma
url = https://github.com/desktop-app/libprisma.git

View File

@ -28,6 +28,7 @@ include(cmake/lib_ffmpeg.cmake)
include(cmake/lib_stripe.cmake)
include(cmake/lib_tgvoip.cmake)
include(cmake/lib_tgcalls.cmake)
include(cmake/lib_prisma.cmake)
include(cmake/td_export.cmake)
include(cmake/td_mtproto.cmake)
include(cmake/td_lang.cmake)

1
Telegram/ThirdParty/libprisma vendored Submodule

@ -0,0 +1 @@
Subproject commit 4521ec4dac39e64b66033de16b342d9f61d8b9c3

View File

@ -947,6 +947,10 @@ win:
git checkout n11.1.5.1
""")
stage('regex', """
git clone -b boost-1.83.0 https://github.com/boostorg/regex.git
""")
stage('ffmpeg', """
git clone https://github.com/FFmpeg/FFmpeg.git ffmpeg
cd ffmpeg

View File

@ -0,0 +1,42 @@
# This file is part of Telegram Desktop,
# the official desktop application for the Telegram messaging service.
#
# For license and copyright information please follow this link:
# https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
add_library(lib_prisma STATIC)
init_target(lib_prisma)
add_library(desktop-app::lib_prisma ALIAS lib_prisma)
set(prisma_loc ${third_party_loc}/libprisma/libprisma)
nice_target_sources(lib_prisma ${prisma_loc}
PRIVATE
Highlight.cpp
Highlight.h
LanguageTree.cpp
LanguageTree.h
SyntaxHighlighter.cpp
SyntaxHighlighter.h
TokenList.cpp
TokenList.h
)
target_compile_definitions(lib_prisma
PRIVATE
BOOST_NO_INTRINSIC_WCHAR_T
BOOST_REGEX_NO_W32
)
target_include_directories(lib_prisma
PRIVATE
${libs_loc}/regex/include
PUBLIC
${prisma_loc}
)
target_link_libraries(lib_prisma
PRIVATE
desktop-app::external_boost_regex
)

2
cmake

@ -1 +1 @@
Subproject commit b1b0e95b091f298c87cb9ec4458f426574221ca4
Subproject commit 813aacf791af9bffcf740df2bd776d4b322e31f7