forked from qt-creator/qt-creator
Wizards/CMake: Make sure GNUInstallDirs is included
Qt 6.4 automatically includes GNUInstallDirs, but before that it didn't. And for the "plain" projects Qt isn't even used. Since the project templates use CMAKE_INSTALL_LIBDIR etc, they must ensure themselves that these are actually available. Fixes: QTCREATORBUG-29067 Change-Id: Id304b829301a33720d8f6c4a9c89157e8fc1c4a9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
@@ -38,6 +38,7 @@ if (LINK_INSIGHT)
|
|||||||
include(${CMAKE_CURRENT_SOURCE_DIR}/insight)
|
include(${CMAKE_CURRENT_SOURCE_DIR}/insight)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
install(TARGETS %{ProjectName}App
|
install(TARGETS %{ProjectName}App
|
||||||
BUNDLE DESTINATION .
|
BUNDLE DESTINATION .
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
@@ -24,6 +24,7 @@ endif()
|
|||||||
|
|
||||||
target_link_libraries(%{ProjectName} PRIVATE Qt${QT_VERSION_MAJOR}::%{QtModule})
|
target_link_libraries(%{ProjectName} PRIVATE Qt${QT_VERSION_MAJOR}::%{QtModule})
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
install(TARGETS %{ProjectName}
|
install(TARGETS %{ProjectName}
|
||||||
@if %{MacOSBundle}
|
@if %{MacOSBundle}
|
||||||
BUNDLE DESTINATION .
|
BUNDLE DESTINATION .
|
||||||
|
@@ -35,6 +35,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
install(TARGETS %{ProjectName}
|
install(TARGETS %{ProjectName}
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
@@ -4,6 +4,7 @@ project(%{ProjectName} LANGUAGES C)
|
|||||||
|
|
||||||
add_executable(%{ProjectName} %{CFileName})
|
add_executable(%{ProjectName} %{CFileName})
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
install(TARGETS %{ProjectName}
|
install(TARGETS %{ProjectName}
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
@@ -7,6 +7,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||||||
|
|
||||||
add_executable(%{ProjectName} %{CppFileName})
|
add_executable(%{ProjectName} %{CppFileName})
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
install(TARGETS %{ProjectName}
|
install(TARGETS %{ProjectName}
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
@@ -39,6 +39,7 @@ target_link_libraries(%{TargetName}
|
|||||||
PRIVATE Qt6::Quick
|
PRIVATE Qt6::Quick
|
||||||
)
|
)
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
install(TARGETS %{TargetName}
|
install(TARGETS %{TargetName}
|
||||||
BUNDLE DESTINATION .
|
BUNDLE DESTINATION .
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
@@ -28,6 +28,7 @@ set_target_properties(%{TargetName} PROPERTIES
|
|||||||
target_link_libraries(%{TargetName}
|
target_link_libraries(%{TargetName}
|
||||||
PRIVATE Qt6::Quick)
|
PRIVATE Qt6::Quick)
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
install(TARGETS %{TargetName}
|
install(TARGETS %{TargetName}
|
||||||
BUNDLE DESTINATION .
|
BUNDLE DESTINATION .
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
|
@@ -69,6 +69,7 @@ set_target_properties(%{ProjectName} PROPERTIES
|
|||||||
WIN32_EXECUTABLE TRUE
|
WIN32_EXECUTABLE TRUE
|
||||||
)
|
)
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
install(TARGETS %{ProjectName}
|
install(TARGETS %{ProjectName}
|
||||||
BUNDLE DESTINATION .
|
BUNDLE DESTINATION .
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
|
@@ -72,6 +72,7 @@ set_target_properties(%{ProjectName} PROPERTIES
|
|||||||
WIN32_EXECUTABLE TRUE
|
WIN32_EXECUTABLE TRUE
|
||||||
)
|
)
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
install(TARGETS %{ProjectName}
|
install(TARGETS %{ProjectName}
|
||||||
BUNDLE DESTINATION .
|
BUNDLE DESTINATION .
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
Reference in New Issue
Block a user