From c53c9592faae66188512a5a067de1235cc37d697 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 4 Apr 2023 13:53:41 +0200 Subject: [PATCH] CMakeProject templates/examples: Fix the install line The installation command needs to define RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} Fixes: QTCREATORBUG-28999 Change-Id: If3f6ed15ef248eb07628bdc9fa4d11a678839a27 Reviewed-by: Joerg Bornemann --- doc/qtcreator/examples/accelbubble/CMakeLists.txt | 4 +++- doc/qtcreator/examples/textfinder/CMakeLists.txt | 4 +++- doc/qtcreator/examples/transitions/CMakeLists.txt | 4 +++- share/qtcreator/templates/wizards/codesnippet/CMakeLists.txt | 4 +++- .../templates/wizards/projects/consoleapp/CMakeLists.txt | 4 +++- .../templates/wizards/projects/plainc/CMakeLists.txt | 4 +++- .../templates/wizards/projects/plaincpp/CMakeLists.txt | 4 +++- .../wizards/projects/qtquickapplication/CMakeLists.txt | 4 +++- .../wizards/projects/qtwidgetsapplication/CMakeLists.txt | 4 +++- 9 files changed, 27 insertions(+), 9 deletions(-) diff --git a/doc/qtcreator/examples/accelbubble/CMakeLists.txt b/doc/qtcreator/examples/accelbubble/CMakeLists.txt index 868e5ea1331..9e67614807a 100644 --- a/doc/qtcreator/examples/accelbubble/CMakeLists.txt +++ b/doc/qtcreator/examples/accelbubble/CMakeLists.txt @@ -40,6 +40,8 @@ target_link_libraries(appaccelbubble install(TARGETS appaccelbubble BUNDLE DESTINATION . - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) qt_finalize_executable(appaccelbubble) diff --git a/doc/qtcreator/examples/textfinder/CMakeLists.txt b/doc/qtcreator/examples/textfinder/CMakeLists.txt index 77a0ba8c152..a00ccd856b4 100644 --- a/doc/qtcreator/examples/textfinder/CMakeLists.txt +++ b/doc/qtcreator/examples/textfinder/CMakeLists.txt @@ -62,7 +62,9 @@ set_target_properties(TextFinder PROPERTIES install(TARGETS TextFinder BUNDLE DESTINATION . - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) if(QT_VERSION_MAJOR EQUAL 6) qt_finalize_executable(TextFinder) diff --git a/doc/qtcreator/examples/transitions/CMakeLists.txt b/doc/qtcreator/examples/transitions/CMakeLists.txt index 3dec945039b..8b363fc8e27 100644 --- a/doc/qtcreator/examples/transitions/CMakeLists.txt +++ b/doc/qtcreator/examples/transitions/CMakeLists.txt @@ -33,4 +33,6 @@ target_link_libraries(apptransitions install(TARGETS apptransitions BUNDLE DESTINATION . - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) diff --git a/share/qtcreator/templates/wizards/codesnippet/CMakeLists.txt b/share/qtcreator/templates/wizards/codesnippet/CMakeLists.txt index 603186293d9..325903743c0 100644 --- a/share/qtcreator/templates/wizards/codesnippet/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/codesnippet/CMakeLists.txt @@ -28,7 +28,9 @@ install(TARGETS %{ProjectName} @if %{MacOSBundle} BUNDLE DESTINATION . @endif - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) set_target_properties(%{ProjectName} PROPERTIES MACOSX_BUNDLE %{MacOSBundleValue}) diff --git a/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt index e53a18b1f90..7be8ecf05aa 100644 --- a/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt @@ -36,4 +36,6 @@ endif() @endif install(TARGETS %{ProjectName} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + 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 53d5f414ca0..49bf10a0890 100644 --- a/share/qtcreator/templates/wizards/projects/plainc/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/plainc/CMakeLists.txt @@ -5,4 +5,6 @@ project(%{ProjectName} LANGUAGES C) add_executable(%{ProjectName} %{CFileName}) install(TARGETS %{ProjectName} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + 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 008eb2ff62e..232bf6d489c 100644 --- a/share/qtcreator/templates/wizards/projects/plaincpp/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/plaincpp/CMakeLists.txt @@ -8,4 +8,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) add_executable(%{ProjectName} %{CppFileName}) install(TARGETS %{ProjectName} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + 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 1f196bef178..92e2a825af7 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/qtquickapplication/CMakeLists.txt @@ -41,4 +41,6 @@ target_link_libraries(%{TargetName} install(TARGETS %{TargetName} BUNDLE DESTINATION . - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) diff --git a/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/CMakeLists.txt index 7573f4cf025..8856a476b9e 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 install(TARGETS %{ProjectName} BUNDLE DESTINATION . - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) if(QT_VERSION_MAJOR EQUAL 6) qt_finalize_executable(%{ProjectName})