Skip to content

Commit

Permalink
refactor: Replace Scintilla with QScintilla
Browse files Browse the repository at this point in the history
1.Remove the `Scintilla` source code
2.Add the `QScintilla` source code
  • Loading branch information
Kakueeen authored and deepin-mozart committed Jan 19, 2024
1 parent 2f7c9d3 commit ce66c64
Show file tree
Hide file tree
Showing 1,006 changed files with 158,990 additions and 259,776 deletions.
12 changes: 6 additions & 6 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ Copyright: 2012, Luca Beltrame <[email protected]>
2007-2014, Simon Edwards <[email protected]>
License: BSD-3-Clause

# scintilla
Files: 3rdparty/unioncode-scintilla515/scintilla/*
Copyright: 1998-2021 by Neil Hodgson <[email protected]>
License: HPND
# qscintilla
Files: 3rdparty/unioncode-qscintilla214/src/*
Copyright: 2023 Riverbank Computing Limited <[email protected]>
License: GPL-3.0-or-later

# lexilla
Files: 3rdparty/unioncode-scintilla515/lexilla/*
# scintilla
Files: 3rdparty/unioncode-qscintilla214/scintilla/*
Copyright: 1998-2021 by Neil Hodgson <[email protected]>
License: HPND

Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_subdirectory(cppdap)
add_subdirectory(unioncode-GitQlient)
add_subdirectory(unioncode-scintilla515)
add_subdirectory(unioncode-qscintilla214)
add_subdirectory(unioncode-qtermwidget-0.14.1)
add_subdirectory(unioncode-jsonrpccpp)
11 changes: 0 additions & 11 deletions 3rdparty/unioncode-lexilla514.cmake

This file was deleted.

7 changes: 7 additions & 0 deletions 3rdparty/unioncode-qscintilla214.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include_directories(
${CMAKE_SOURCE_DIR}/3rdparty/unioncode-qscintilla214/src
)

set(CMAKE_CXX_STANDARD 17)

link_libraries(unioncode-qscintilla)
48 changes: 48 additions & 0 deletions 3rdparty/unioncode-qscintilla214/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
cmake_minimum_required(VERSION 3.10)

project(unioncode-qscintilla)
set(CMAKE_CXX_STANDARD 17)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

find_package(Qt5 COMPONENTS
Widgets
PrintSupport
REQUIRED)
find_package(Dtk COMPONENTS Widget REQUIRED)

file(GLOB_RECURSE SRCS CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/Qsci/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/Qsci/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/scintilla/*/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/scintilla/*/*.cpp"
)

add_definitions(-DSCINTILLA_QT -DSCI_LEXER -DINCLUDE_DEPRECATED_FEATURES)

add_library(${PROJECT_NAME} ${SRCS})

target_include_directories(${PROJECT_NAME}
PRIVATE
${DtkWidget_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/scintilla/include
${CMAKE_CURRENT_SOURCE_DIR}/scintilla/src
${CMAKE_CURRENT_SOURCE_DIR}/scintilla/lexlib
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/src/Qsci
)

target_link_libraries(
${PROJECT_NAME}
Qt5::Widgets
Qt5::PrintSupport
${DtkWidget_LIBRARIES}
)

install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${LIBRARY_INSTALL_PREFIX})
Loading

0 comments on commit ce66c64

Please sign in to comment.