diff options
| author | ruki <[email protected]> | 2024-04-28 22:42:30 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-04-28 22:43:35 +0800 |
| commit | 8b8831f9ada63c5b81beec40619b67e5529dbfe4 (patch) | |
| tree | e3e8ac092055f21c76ef27836a12893e05e9e3a3 | |
| parent | 5f1a07e6f343a67ed53a30d302eea916fc069e91 (diff) | |
improve ldflags for autoconf
| -rw-r--r-- | tests/projects/qt/quickapp/src/main.cpp | 3 | ||||
| -rw-r--r-- | tests/projects/qt/widgetapp/src/main.cpp | 4 | ||||
| -rw-r--r-- | tests/projects/qt/widgetapp_static/src/main.cpp | 4 | ||||
| -rw-r--r-- | xmake/modules/package/tools/autoconf.lua | 7 |
4 files changed, 5 insertions, 13 deletions
diff --git a/tests/projects/qt/quickapp/src/main.cpp b/tests/projects/qt/quickapp/src/main.cpp index 2ec4b880c..7d9cb80df 100644 --- a/tests/projects/qt/quickapp/src/main.cpp +++ b/tests/projects/qt/quickapp/src/main.cpp @@ -1,8 +1,7 @@ #include <QGuiApplication> #include <QQmlApplicationEngine> -int main(int argc, char *argv[]) -{ +int main(int argc, char *argv[]) { #if QT_VERSION >= 0x50601 QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif diff --git a/tests/projects/qt/widgetapp/src/main.cpp b/tests/projects/qt/widgetapp/src/main.cpp index b48f94ec8..eb4e26c90 100644 --- a/tests/projects/qt/widgetapp/src/main.cpp +++ b/tests/projects/qt/widgetapp/src/main.cpp @@ -1,11 +1,9 @@ #include "mainwindow.h" #include <QApplication> -int main(int argc, char *argv[]) -{ +int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); - return a.exec(); } diff --git a/tests/projects/qt/widgetapp_static/src/main.cpp b/tests/projects/qt/widgetapp_static/src/main.cpp index b48f94ec8..eb4e26c90 100644 --- a/tests/projects/qt/widgetapp_static/src/main.cpp +++ b/tests/projects/qt/widgetapp_static/src/main.cpp @@ -1,11 +1,9 @@ #include "mainwindow.h" #include <QApplication> -int main(int argc, char *argv[]) -{ +int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); - return a.exec(); } diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index 11087b77a..7636cad60 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -339,12 +339,9 @@ function buildenvs(package, opt) if arflags then envs.ARFLAGS = table.concat(_translate_paths(arflags), ' ') end - if ldflags then - envs.LDFLAGS = table.concat(_translate_paths(ldflags), ' ') - end - if shflags then + if ldflags or shflags then -- autoconf does not use SHFLAGS - envs.LDFLAGS = table.concat(_translate_paths(shflags), ' ') + envs.LDFLAGS = table.concat(_translate_paths(table.join(ldflags or {}, shflags)), ' ') end -- cross-compilation? pass the full build environments |
