cmake-plugin: 处理在 Windows 中基于源代码构建范例插件的编译宏问题

This commit is contained in:
zinface 2023-03-21 17:00:20 +08:00
parent 1b28afacc0
commit 765eba148f
1 changed files with 10 additions and 2 deletions

View File

@ -51,7 +51,7 @@ endif(TRUE)
# ----------------- helloworld-next ----------------- #
if(WIN32)
if(WIN32 AND NOTEPAD_BUILD_BY_SHARED)
# Windows QScintilla
target_compile_definitions(${LOCAL_PLUGIN_NAME}
PRIVATE
@ -59,7 +59,15 @@ if(WIN32)
QSCINTILLA_DLL # Windows 使 QSci Q_DECL_IMPORT
# QSCINTILLA_EXPORT Q_DECL_IMPORT
)
endif(WIN32)
else()
# Windows QScintilla
target_compile_definitions(${LOCAL_PLUGIN_NAME}
PRIVATE
NOTEPAD_PLUGIN_MANAGER
# QSCINTILLA_DLL # Windows 使 QSci Q_DECL_IMPORT
# QSCINTILLA_EXPORT Q_DECL_IMPORT
)
endif(WIN32 AND NOTEPAD_BUILD_BY_SHARED)
if(UNIX)
# Unix/Linux