diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2022-06-23 15:04:35 +0200 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2022-06-24 11:53:17 +0000 |
commit | 90e691251fd7b3c2f74d797e2f6d9eca9ab3cd82 (patch) | |
tree | 17d4cece6db0fbc341d7f13df5b7e369b349ac22 | |
parent | ffa3aad57647be2d33246b5f07eaa32450dd87a6 (diff) |
Fix install command in wizard generated CMake files for Android
"error: install TARGETS given no LIBRARY DESTINATION for module target
<...>."
Change-Id: I9b283e342b32c7d3df44bb5aed231b843e3e54ae
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
6 files changed, 15 insertions, 6 deletions
diff --git a/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt index 1af66d937b6..0b864f908c2 100644 --- a/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt @@ -37,4 +37,5 @@ else() endif() @endif -install(TARGETS %{ProjectName}) +install(TARGETS %{ProjectName} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/share/qtcreator/templates/wizards/projects/plainc/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/plainc/CMakeLists.txt index d33adb59eb8..53d5f414ca0 100644 --- a/share/qtcreator/templates/wizards/projects/plainc/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/plainc/CMakeLists.txt @@ -4,4 +4,5 @@ project(%{ProjectName} LANGUAGES C) add_executable(%{ProjectName} %{CFileName}) -install(TARGETS %{ProjectName}) +install(TARGETS %{ProjectName} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/share/qtcreator/templates/wizards/projects/plaincpp/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/plaincpp/CMakeLists.txt index c8a95f5a4ce..008eb2ff62e 100644 --- a/share/qtcreator/templates/wizards/projects/plaincpp/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/plaincpp/CMakeLists.txt @@ -7,4 +7,5 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) add_executable(%{ProjectName} %{CppFileName}) -install(TARGETS %{ProjectName}) +install(TARGETS %{ProjectName} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.6.x.txt b/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.6.x.txt index 03f9091f768..9d2fc4a82cc 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.6.x.txt +++ b/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.6.x.txt @@ -28,4 +28,6 @@ set_target_properties(%{TargetName} PROPERTIES target_link_libraries(%{TargetName} PRIVATE Qt6::Quick) -install(TARGETS %{TargetName} BUNDLE DESTINATION .) +install(TARGETS %{TargetName} + BUNDLE DESTINATION . + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt index 79ad6ad2991..58af2d44a2b 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt @@ -71,7 +71,9 @@ set_target_properties(%{ProjectName} PROPERTIES WIN32_EXECUTABLE TRUE ) -install(TARGETS %{ProjectName} BUNDLE DESTINATION .) +install(TARGETS %{ProjectName} + BUNDLE DESTINATION . + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) if(QT_VERSION_MAJOR EQUAL 6) qt_import_qml_plugins(%{ProjectName}) diff --git a/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists.txt index 9dc83c698c0..b682c95f228 100644 --- a/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists.txt @@ -74,7 +74,9 @@ set_target_properties(%{ProjectName} PROPERTIES WIN32_EXECUTABLE TRUE ) -install(TARGETS %{ProjectName} BUNDLE DESTINATION .) +install(TARGETS %{ProjectName} + BUNDLE DESTINATION . + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) if(QT_VERSION_MAJOR EQUAL 6) qt_finalize_executable(%{ProjectName}) |