diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.main.txt.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.main.txt.tpl index ef31652b0eb..0adf6e1c98e 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.main.txt.tpl +++ b/share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.main.txt.tpl @@ -38,6 +38,7 @@ if (LINK_INSIGHT) include(${CMAKE_CURRENT_SOURCE_DIR}/insight) endif () +include(GNUInstallDirs) install(TARGETS %{ProjectName}App BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/share/qtcreator/templates/wizards/codesnippet/CMakeLists.txt b/share/qtcreator/templates/wizards/codesnippet/CMakeLists.txt index 325903743c0..0e923c87945 100644 --- a/share/qtcreator/templates/wizards/codesnippet/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/codesnippet/CMakeLists.txt @@ -24,6 +24,7 @@ endif() target_link_libraries(%{ProjectName} PRIVATE Qt${QT_VERSION_MAJOR}::%{QtModule}) +include(GNUInstallDirs) install(TARGETS %{ProjectName} @if %{MacOSBundle} BUNDLE DESTINATION . diff --git a/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt index 7be8ecf05aa..a6f956127dd 100644 --- a/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt @@ -35,6 +35,7 @@ else() endif() @endif +include(GNUInstallDirs) install(TARGETS %{ProjectName} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} diff --git a/share/qtcreator/templates/wizards/projects/plainc/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/plainc/CMakeLists.txt index 49bf10a0890..1a0a570e66f 100644 --- a/share/qtcreator/templates/wizards/projects/plainc/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/plainc/CMakeLists.txt @@ -4,6 +4,7 @@ project(%{ProjectName} LANGUAGES C) add_executable(%{ProjectName} %{CFileName}) +include(GNUInstallDirs) install(TARGETS %{ProjectName} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} diff --git a/share/qtcreator/templates/wizards/projects/plaincpp/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/plaincpp/CMakeLists.txt index 232bf6d489c..df5ef8a5cce 100644 --- a/share/qtcreator/templates/wizards/projects/plaincpp/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/plaincpp/CMakeLists.txt @@ -7,6 +7,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) add_executable(%{ProjectName} %{CppFileName}) +include(GNUInstallDirs) install(TARGETS %{ProjectName} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} diff --git a/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt index 92e2a825af7..4166c0217ff 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt @@ -39,6 +39,7 @@ target_link_libraries(%{TargetName} PRIVATE Qt6::Quick ) +include(GNUInstallDirs) install(TARGETS %{TargetName} BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/share/qtcreator/templates/wizards/projects/qtquickapplication_compat/CMakeLists.6.x.txt b/share/qtcreator/templates/wizards/projects/qtquickapplication_compat/CMakeLists.6.x.txt index 9d2fc4a82cc..d8e87ead7b4 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickapplication_compat/CMakeLists.6.x.txt +++ b/share/qtcreator/templates/wizards/projects/qtquickapplication_compat/CMakeLists.6.x.txt @@ -28,6 +28,7 @@ set_target_properties(%{TargetName} PROPERTIES target_link_libraries(%{TargetName} PRIVATE Qt6::Quick) +include(GNUInstallDirs) install(TARGETS %{TargetName} BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/share/qtcreator/templates/wizards/projects/qtquickapplication_compat/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/qtquickapplication_compat/CMakeLists.txt index 3b5806eb093..4d35317a9fe 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickapplication_compat/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/qtquickapplication_compat/CMakeLists.txt @@ -69,6 +69,7 @@ set_target_properties(%{ProjectName} PROPERTIES WIN32_EXECUTABLE TRUE ) +include(GNUInstallDirs) install(TARGETS %{ProjectName} BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists.txt index 8856a476b9e..4bda9db7a79 100644 --- a/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists.txt @@ -72,6 +72,7 @@ set_target_properties(%{ProjectName} PROPERTIES WIN32_EXECUTABLE TRUE ) +include(GNUInstallDirs) install(TARGETS %{ProjectName} BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}