mirror of https://gitee.com/cxasm/notepad--.git
add cmake support
This commit is contained in:
parent
9ad3c32882
commit
0940320b60
|
@ -0,0 +1,31 @@
|
|||
cmake_minimum_required(VERSION 3.24)
|
||||
project(notepad--)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets Concurrent Network PrintSupport XmlPatterns)
|
||||
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/src/qscint)
|
||||
|
||||
|
||||
file(GLOB UI_SRC ${PROJECT_SOURCE_DIR}/src/*.ui)
|
||||
set(UI_SRC ${UI_SRC} ${PROJECT_SOURCE_DIR}/src/cceditor/ccnotepad.ui)
|
||||
aux_source_directory(${PROJECT_SOURCE_DIR}/src SRC)
|
||||
aux_source_directory(${PROJECT_SOURCE_DIR}/src/cceditor SRC)
|
||||
|
||||
add_executable(${PROJECT_NAME} ${SRC} ${UI_SRC} ${PROJECT_SOURCE_DIR}/src/RealCompare.qrc)
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src
|
||||
${PROJECT_SOURCE_DIR}/src/cceditor
|
||||
|
||||
${PROJECT_SOURCE_DIR}/src/qscint/src
|
||||
${PROJECT_SOURCE_DIR}/src/qscint/src/Qsci
|
||||
${PROJECT_SOURCE_DIR}/src/qscint/scintilla/src
|
||||
${PROJECT_SOURCE_DIR}/src/qscint/scintilla/include
|
||||
${PROJECT_SOURCE_DIR}/src/qscint/scintilla/lexlib
|
||||
${PROJECT_SOURCE_DIR}/src/qscint/scintilla/boostregex
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} qscint Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Concurrent Qt5::Network Qt5::PrintSupport Qt5::XmlPatterns)
|
|
@ -7,10 +7,14 @@
|
|||
#include "ui_findcmpwin.h"
|
||||
#include "rcglobal.h"
|
||||
|
||||
#ifndef DEF_FIND_TAB_INDEX
|
||||
#define DEF_FIND_TAB_INDEX
|
||||
|
||||
enum FindTabIndex {
|
||||
FIND_TAB,
|
||||
REPLACE_TAB,
|
||||
};
|
||||
#endif
|
||||
class ScintillaEditView;
|
||||
|
||||
//struct FindCmpRecord {
|
||||
|
|
|
@ -6,13 +6,16 @@
|
|||
|
||||
|
||||
#include "ui_findwin.h"
|
||||
|
||||
#ifndef DEF_FIND_TAB_INDEX
|
||||
#define DEF_FIND_TAB_INDEX
|
||||
enum FindTabIndex {
|
||||
FIND_TAB =0,
|
||||
REPLACE_TAB,
|
||||
DIR_FIND_TAB,
|
||||
MARK_TAB,
|
||||
};
|
||||
#endif
|
||||
|
||||
class ScintillaEditView;
|
||||
class QsciScintilla;
|
||||
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
cmake_minimum_required(VERSION 3.24)
|
||||
project(qscint CXX)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets PrintSupport)
|
||||
|
||||
aux_source_directory(${PROJECT_SOURCE_DIR}/src SRC)
|
||||
aux_source_directory(${PROJECT_SOURCE_DIR}/scintilla/lexers SRC)
|
||||
aux_source_directory(${PROJECT_SOURCE_DIR}/scintilla/lexlib SRC)
|
||||
aux_source_directory(${PROJECT_SOURCE_DIR}/scintilla/src SRC)
|
||||
aux_source_directory(${PROJECT_SOURCE_DIR}/scintilla/boostregex SRC)
|
||||
|
||||
file(GLOB MOC_HEADER ${PROJECT_SOURCE_DIR}/src/Qsci/*.h)
|
||||
|
||||
#message(${MOC_HEADER})
|
||||
|
||||
add_library(${PROJECT_NAME} STATIC ${SRC} ${MOC_HEADER})
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE SCINTILLA_QT SCI_LEXER INCLUDE_DEPRECATED_FEATURES)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/scintilla/lexlib
|
||||
${PROJECT_SOURCE_DIR}/scintilla/boostregex
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||
${PROJECT_SOURCE_DIR}/src
|
||||
${PROJECT_SOURCE_DIR}/src/Qsci
|
||||
${PROJECT_SOURCE_DIR}/scintilla/src
|
||||
${PROJECT_SOURCE_DIR}/scintilla/include)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Concurrent Qt5::Network Qt5::PrintSupport)
|
Loading…
Reference in New Issue