-
target_compile_definitions(tgfx PUBLIC ${TGFX_DEFINES})
target_compile_options(tgfx PUBLIC ${TGFX_COMPILE_OPTIONS})这里的编译参数是不是应该改为 target_compile_definitions(tgfx PUBLIC "$<$<COMPILE_LANGUAGE:C,CXX>:${TGFX_DEFINES}>")
target_compile_options(tgfx PUBLIC "$<$<COMPILE_LANGUAGE:C,CXX>:${TGFX_COMPILE_OPTIONS}>")观察到这个问题是因为在cmake 中添加了 switf 源码后,这些编译参数会被Xcode给添加的switf的编译参数里面,而swift编译器又无法识别这些参数,导致编译失败。 |
Beta Was this translation helpful? Give feedback.
Answered by
domchen
Nov 12, 2025
Replies: 2 comments 5 replies
-
|
你具体是如何添加swift源码的?这些参数已经是只作用于tgfx这个target,不是全局的。tgfx的target里只有C++代码,没有swift的 |
Beta Was this translation helpful? Give feedback.
4 replies
-
|
这个问题已经在 #1039 中修复,可以验证一下。 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
domchen
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这个问题已经在 #1039 中修复,可以验证一下。