From c59a2f071f53f88516bb487e5bcef37d027ecc43 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 10 Apr 2018 00:28:08 +0800 Subject: add qt_console rule --- tests/projects/qt_console/src/main.cpp | 9 +++++++++ tests/projects/qt_console/xmake.lua | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 tests/projects/qt_console/src/main.cpp create mode 100644 tests/projects/qt_console/xmake.lua (limited to 'tests/projects') diff --git a/tests/projects/qt_console/src/main.cpp b/tests/projects/qt_console/src/main.cpp new file mode 100644 index 000000000..de25444ff --- /dev/null +++ b/tests/projects/qt_console/src/main.cpp @@ -0,0 +1,9 @@ +#include + +int main(int argc, char *argv[]) +{ + QCoreApplication a(argc, argv); + + printf("hello xmake\n"); + return a.exec(); +} diff --git a/tests/projects/qt_console/xmake.lua b/tests/projects/qt_console/xmake.lua new file mode 100644 index 000000000..d7151f790 --- /dev/null +++ b/tests/projects/qt_console/xmake.lua @@ -0,0 +1,32 @@ +-- the debug mode +if is_mode("debug") then + + -- enable the debug symbols + set_symbols("debug") + + -- disable optimization + set_optimize("none") +end + +-- the release mode +if is_mode("release") then + + -- set the symbols visibility: hidden + set_symbols("hidden") + + -- enable fastest optimization + set_optimize("fastest") + + -- strip all symbols + set_strip("all") +end + +-- add target +target("qt_console") + + -- add rules + add_rules("qt_console") + + -- add files + add_files("src/*.cpp") + -- cgit v1.3.1