cmake/modules: 提升 QSCINTILLA_EXPORT 的可传染性编译时宏定义

This commit is contained in:
zinface 2023-04-06 01:13:08 +08:00
parent 824d367191
commit 6597452033
2 changed files with 19 additions and 19 deletions

View File

@ -53,20 +53,18 @@ endif(TRUE)
# ----------------- Notepad-- ----------------- #
if(WIN32)
# Windows QScintilla
target_compile_definitions(${PROJECT_NAME}
PRIVATE
NO_PLUGIN #
QSCINTILLA_DLL # Windows 使 QSci Q_DECL_IMPORT
# QSCINTILLA_EXPORT Q_DECL_IMPORT
)
endif(WIN32)
# Windows QScintilla
target_compile_definitions(${PROJECT_NAME}
PRIVATE
NO_PLUGIN #
)
#
add_custom_target(targetdebug
COMMAND
${CMAKE_COMMAND} -E echo
">>>>> Notepad-- COMPILE_DEFINITIONS: $<TARGET_PROPERTY:Notepad--,COMPILE_DEFINITIONS>"
COMMAND
${CMAKE_COMMAND} -E echo
">>>>> Notepad-- LINK_LIBRARIES: $<TARGET_PROPERTY:Notepad--,LINK_LIBRARIES>")
if(UNIX)
# Windows QScintilla
target_compile_definitions(${PROJECT_NAME}
PRIVATE
NO_PLUGIN #
)
endif(UNIX)

View File

@ -57,10 +57,12 @@ if(WIN32)
SCINTILLA_QT #
SCI_LEXER #
INCLUDE_DEPRECATED_FEATURES #
QSCINTILLA_MAKE_DLL # Windows Q_DECL_EXPORT
# Windows 使 Q_DECL_IMPORT
# QSCINTILLA_EXPORT
# QSCINTILLA_EXPORT
# 构建时(导出)由外部使用时(导入)
QSCINTILLA_MAKE_DLL # Windows Q_DECL_EXPORT
INTERFACE
QSCINTILLA_DLL # Windows 使 Q_DECL_IMPORT
)
endif(WIN32)