msvc/mingw: 为 Windows 平台配置正确 QScint 库的构建,以用于插件开发支持

This commit is contained in:
zinface 2024-03-19 16:49:33 +08:00
parent 1acc604635
commit 13dad44cbc
1 changed files with 33 additions and 11 deletions

View File

@ -60,18 +60,40 @@ endif(TRUE)
if(WIN32)
# Windows QScintilla
target_compile_definitions(QSci
PRIVATE
SCINTILLA_QT #
SCI_LEXER #
INCLUDE_DEPRECATED_FEATURES #
if(NOTEPAD_BUILD_BY_SHARED)
# Windows QSci
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# Windows 使 MSVC
target_compile_definitions(QSci
PRIVATE
SCINTILLA_QT #
SCI_LEXER #
INCLUDE_DEPRECATED_FEATURES #
# QSCINTILLA_EXPORT
# 构建时(导出)由外部使用时(导入)
QSCINTILLA_MAKE_DLL # Windows Q_DECL_EXPORT
INTERFACE
QSCINTILLA_DLL # Windows 使 Q_DECL_IMPORT
)
# QSCINTILLA_EXPORT
# 构建时(导出)由外部使用时(导入)
QSCINTILLA_MAKE_DLL # Windows Q_DECL_EXPORT
INTERFACE
QSCINTILLA_DLL # Windows 使 Q_DECL_IMPORT
)
else()
# Windows 使 MinGW
target_compile_definitions(QSci
PRIVATE
SCINTILLA_QT #
SCI_LEXER #
INCLUDE_DEPRECATED_FEATURES #
)
endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
else()
# Windows QSci
target_compile_definitions(QSci
PRIVATE
SCINTILLA_QT #
SCI_LEXER #
INCLUDE_DEPRECATED_FEATURES #
)
endif(NOTEPAD_BUILD_BY_SHARED)
endif(WIN32)
if(UNIX)