| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- -- QWindowKit 库
- target("qwindowkit")
- set_kind("static")
- if is_plat("windows") then
- add_defines("UNICODE", "_UNICODE")
- end
-
- -- 源文件
- add_defines("QWK_CORE_STATIC","QWK_WIDGETS_STATIC", {public = true})
- -- 头文件
- add_includedirs("src/core")
- add_includedirs("src")
- add_files("src/core/contexts/abstractwindowcontext_p.h")
- add_files("src/core/contexts/cocoawindowcontext_p.h")
- add_files("src/core/contexts/qtwindowcontext_p.h")
- add_files("src/core/contexts/win32windowcontext_p.h")
- add_files("src/core/kernel/nativeeventfilter_p.h")
- add_files("src/core/kernel/sharedeventfilter_p.h")
- add_files("src/core/kernel/winidchangeeventfilter_p.h")
- -- # add_files("src/core/qwindowkit_linux.h")
- add_files("src/core/qwindowkit_windows.h")
- add_files("src/core/qwkglobal.h")
- add_files("src/core/qwkglobal_p.h")
- add_files("src/core/shared/qwkwindowsextra_p.h")
- add_files("src/core/shared/systemwindow_p.h")
- add_files("src/core/shared/windows10borderhandler_p.h")
- add_files("src/core/style/styleagent.h")
- add_files("src/core/style/styleagent_p.h")
- add_files("src/core/windowagentbase.h")
- add_files("src/core/windowagentbase_p.h")
- add_files("src/core/windowitemdelegate_p.h")
- add_files("src/widgets/qwkwidgetsglobal.h")
- add_files("src/widgets/widgetitemdelegate_p.h")
- add_files("src/widgets/widgetwindowagent.h")
- add_files("src/widgets/widgetwindowagent_p.h")
- add_files("src/core/contexts/abstractwindowcontext.cpp")
- --# add_files("src/core/contexts/cocoawindowcontext.mm")
- add_files("src/core/contexts/qtwindowcontext.cpp")
- add_files("src/core/contexts/win32windowcontext.cpp")
- add_files("src/core/kernel/nativeeventfilter.cpp")
- add_files("src/core/kernel/sharedeventfilter.cpp")
- add_files("src/core/kernel/winidchangeeventfilter.cpp")
- add_files("src/core/qwindowkit_windows.cpp")
- add_files("src/core/qwkglobal.cpp")
- add_files("src/core/style/styleagent.cpp")
- --# add_files("src/core/style/styleagent_linux.cpp")
- --# add_files("src/core/style/styleagent_mac.mm")
- add_files("src/core/style/styleagent_win.cpp")
- add_files("src/core/windowagentbase.cpp")
- add_files("src/core/windowitemdelegate.cpp")
- add_files("src/widgets/widgetitemdelegate.cpp")
- add_files("src/widgets/widgetwindowagent.cpp")
- --# add_files("src/widgets/widgetwindowagent_mac.cpp")
- add_files("src/widgets/widgetwindowagent_win.cpp")
- -- 包含目录
- add_includedirs("src", {public = true})
-
- -- Qt 配置
- add_rules("qt.static")
-
- -- Qt MOC 处理
- -- add_files("src/**/*.h", {rules = "qt.moc"})
-
- -- C++17 标准
- set_languages("c++17")
-
- -- Windows 特定配置
- if is_plat("windows") then
- add_cxflags("/utf-8")
- add_syslinks("user32", "gdi32", "ole32", "oleaut32")
- add_syslinks("dwmapi", "uxtheme", "shell32")
- else
- add_cxflags("-Wall", "-Wextra")
- end
- add_frameworks("QtCore", "QtGui", "QtWidgets")
- target_end()
- target("qwindowkit_widgets")
- add_rules("qt.static")
- if is_plat("windows") then
- add_defines("UNICODE", "_UNICODE")
- end
-
- add_includedirs("examples/shared", {public = true})
- add_files("examples/shared/widgetframe/windowbar.h")
- add_files("examples/shared/widgetframe/windowbar_p.h")
- add_files("examples/shared/widgetframe/windowbutton.h")
- add_files("examples/shared/widgetframe/windowbutton_p.h")
- add_files("examples/shared/widgetframe/windowbar.cpp")
- add_files("examples/shared/widgetframe/windowbutton.cpp")
- add_frameworks("QtCore", "QtGui", "QtWidgets")
- target_end()
|