diff options
| author | ruki <[email protected]> | 2018-04-17 00:29:59 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-04-16 20:59:58 +0800 |
| commit | 811bda9a12d7cecfaac97f2ab9943daa4e627396 (patch) | |
| tree | 4da40a60fb6ffc7202bf54a22cda561da1ed458c /xmake/rules/qt/console/load.lua | |
| parent | 05f1e2189edb9cdab244a19f170bbccf1938c90e (diff) | |
improve qt rules
Diffstat (limited to 'xmake/rules/qt/console/load.lua')
| -rw-r--r-- | xmake/rules/qt/console/load.lua | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/xmake/rules/qt/console/load.lua b/xmake/rules/qt/console/load.lua deleted file mode 100644 index 4185132e0..000000000 --- a/xmake/rules/qt/console/load.lua +++ /dev/null @@ -1,67 +0,0 @@ ---!A cross-platform build utility based on Lua --- --- Licensed to the Apache Software Foundation (ASF) under one --- or more contributor license agreements. See the NOTICE file --- distributed with this work for additional information --- regarding copyright ownership. The ASF licenses this file --- to you under the Apache License, Version 2.0 (the --- "License"); you may not use this file except in compliance --- with the License. You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, software --- distributed under the License is distributed on an "AS IS" BASIS, --- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --- See the License for the specific language governing permissions and --- limitations under the License. --- --- Copyright (C) 2015 - 2018, TBOOX Open Source Group. --- --- @author ruki --- @file load.lua --- - --- imports -import("core.project.config") -import("detect.sdks.find_qt") - --- the main entry -function main(target) - - -- check qt sdk - local qt = assert(find_qt(nil, {verbose = true}), "Qt SDK not found!") - - -- set kind: binary - target:set("kind", "binary") - - -- 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") - elseif is_mode("release") then - target:add("defines", "QT_NO_DEBUG") - elseif is_mode("profile") then - target:add("defines", "QT_QML_DEBUG", "QT_NO_DEBUG") - end - - -- The following define makes your compiler emit warnings if you use - -- any feature of Qt which as been marked deprecated (the exact warnings - -- depend on your compiler). Please consult the documentation of the - -- deprecated API in order to know how to port your code away from it. - target:add("defines", "QT_DEPRECATED_WARNINGS") - - -- add includedirs, linkdirs for macosx - 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("includedirs", path.join(qt.sdkdir, "mkspecs/macx-clang")) - target:add("rpathdirs", "@executable_path/Frameworks", qt.linkdirs) - end -end |
