From 4dab3917696d31139166ada278a9b4e4f4e9e4e6 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 15 Apr 2018 21:34:39 +0800 Subject: impl qt console rule with qt sdk --- xmake/rules/qt/console/load.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'xmake/rules/qt/console/load.lua') diff --git a/xmake/rules/qt/console/load.lua b/xmake/rules/qt/console/load.lua index 8d752b9cd..0976d2ed4 100644 --- a/xmake/rules/qt/console/load.lua +++ b/xmake/rules/qt/console/load.lua @@ -38,6 +38,9 @@ function main(target) -- add defines for using core lib target:add("defines", "QT_CORE_LIB") + -- need c++11 + target:set("languages", "cxx11") + -- add defines for the compile mode if is_mode("debug") then target:add("defines", "QT_QML_DEBUG") @@ -53,6 +56,11 @@ function main(target) -- deprecated API in order to know how to port your code away from it. target:add("defines", "QT_DEPRECATED_WARNINGS") - -- add framework directories - target:add("frameworkdirs", qt.libdir) + -- add frameworks + if is_plat("macosx") then + target:add("frameworkdirs", qt.linkdirs) + target:add("frameworks", "QtCore", "DiskArbitration", "IOKit") + target:add("includedirs", path.join(qt.sdkdir, "lib/QtCore.framework/Headers")) + target:add("rpathdirs", "@executable_path/Frameworks", qt.linkdirs) + end end -- cgit v1.3.1