mirror of https://gitee.com/cxasm/notepad--.git
cmake-modules: 下一代模块化构建
This commit is contained in:
parent
cb597ca5ec
commit
9fe169963e
|
@ -17,71 +17,13 @@ endif()
|
|||
|
||||
# ----------------- 构建 QSci 静态库 ----------------- #
|
||||
if(TRUE)
|
||||
# add_subdirectory(${PROJECT_SOURCE_DIR}/src/qscint)
|
||||
# file(GLOB MOC_HEADER src/qscint/src/Qsci/*.h)
|
||||
spark_file_glob(MOC_HEADER "src/qscint/src/Qsci/*.h")
|
||||
|
||||
spark_add_source_paths(QSciSources
|
||||
src/qscint/src
|
||||
src/qscint/scintilla/lexers
|
||||
src/qscint/scintilla/lexlib
|
||||
src/qscint/scintilla/src
|
||||
src/qscint/scintilla/boostregex
|
||||
|
||||
# src/qscint/src/Qsci
|
||||
# FAIL: only *.ui will spark_file_glob(MOC_HEADER ...)
|
||||
)
|
||||
spark_add_library(QSci STATIC ${QSciSources} ${MOC_HEADER})
|
||||
target_compile_definitions(QSci PRIVATE SCINTILLA_QT SCI_LEXER INCLUDE_DEPRECATED_FEATURES)
|
||||
target_include_directories(QSci PRIVATE
|
||||
src/qscint/scintilla/boostregex
|
||||
src/qscint/scintilla/lexlib)
|
||||
target_include_directories(QSci PUBLIC
|
||||
src/qscint/src
|
||||
src/qscint/src/Qsci
|
||||
src/qscint/scintilla/src
|
||||
src/qscint/scintilla/include)
|
||||
target_link_qt5(QSci)
|
||||
target_link_qt5_PrintSupport(QSci)
|
||||
target_link_qt5_Concurrent(QSci)
|
||||
include(cmake/modules/QScint.cmake)
|
||||
endif(TRUE)
|
||||
|
||||
|
||||
# ----------------- 构建 Notepad-- 程序 ----------------- #
|
||||
if(TRUE)
|
||||
|
||||
# 准备构建 CCEditor
|
||||
set(QRC_SOURCES src/RealCompare.qrc)
|
||||
spark_aux_source_paths(CCEditorSources
|
||||
src
|
||||
src/cceditor
|
||||
)
|
||||
spark_add_executable(${PROJECT_NAME} ${CCEditorSources} ${QRC_SOURCES})
|
||||
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} QSci)
|
||||
target_link_QSci(${PROJECT_NAME})
|
||||
target_link_qt5_XmlPatterns(${PROJECT_NAME})
|
||||
|
||||
endif(TRUE)
|
||||
|
||||
# ----------------- Notepad-- 插件支持相关 ----------------- #
|
||||
if(TRUE)
|
||||
|
||||
# 开启插件支持
|
||||
target_compile_definitions(${PROJECT_NAME} PUBLIC NO_PLUGIN=0)
|
||||
|
||||
# 其它有关插件的部分处理...
|
||||
|
||||
include(cmake/modules/Notepad--.cmake)
|
||||
endif(TRUE)
|
||||
|
||||
# ----------------- Notepad-- 其它主线构建相关 ----------------- #
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
if(TRUE)
|
||||
# 准备构建 Notepad-- 主程序
|
||||
set(QRC_SOURCES src/RealCompare.qrc)
|
||||
spark_aux_source_paths(CCEditorSources
|
||||
src
|
||||
src/cceditor
|
||||
)
|
||||
spark_add_executable(${PROJECT_NAME} ${CCEditorSources} ${QRC_SOURCES})
|
||||
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} QSci)
|
||||
target_link_QSci(${PROJECT_NAME})
|
||||
target_link_qt5_XmlPatterns(${PROJECT_NAME})
|
||||
|
||||
endif(TRUE)
|
||||
|
||||
# ----------------- Notepad-- 插件支持相关 ----------------- #
|
||||
if(TRUE)
|
||||
# 开启插件支持
|
||||
target_compile_definitions(${PROJECT_NAME} PUBLIC NO_PLUGIN=0)
|
||||
# 其它有关插件的部分处理...
|
||||
endif(TRUE)
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
if(TRUE)
|
||||
# add_subdirectory(${PROJECT_SOURCE_DIR}/src/qscint)
|
||||
# file(GLOB MOC_HEADER src/qscint/src/Qsci/*.h)
|
||||
spark_file_glob(MOC_HEADER "src/qscint/src/Qsci/*.h")
|
||||
|
||||
spark_add_source_paths(QSciSources
|
||||
src/qscint/src
|
||||
src/qscint/scintilla/lexers
|
||||
src/qscint/scintilla/lexlib
|
||||
src/qscint/scintilla/src
|
||||
src/qscint/scintilla/boostregex
|
||||
|
||||
# src/qscint/src/Qsci
|
||||
# FAIL: only *.ui will spark_file_glob(MOC_HEADER ...)
|
||||
)
|
||||
spark_add_library(QSci STATIC ${QSciSources} ${MOC_HEADER})
|
||||
target_compile_definitions(QSci PRIVATE SCINTILLA_QT SCI_LEXER INCLUDE_DEPRECATED_FEATURES)
|
||||
target_include_directories(QSci PRIVATE
|
||||
src/qscint/scintilla/boostregex
|
||||
src/qscint/scintilla/lexlib)
|
||||
target_include_directories(QSci PUBLIC
|
||||
src/qscint/src
|
||||
src/qscint/src/Qsci
|
||||
src/qscint/scintilla/src
|
||||
src/qscint/scintilla/include)
|
||||
target_link_qt5(QSci)
|
||||
target_link_qt5_PrintSupport(QSci)
|
||||
target_link_qt5_Concurrent(QSci)
|
||||
endif(TRUE)
|
Loading…
Reference in New Issue