mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-09 00:29:55 -06:00
cmake-gui: Restore linking of Qt resources
Refactoring in commit 41e223deb3 (CMake GUI: Split up into libraries,
add test shim, 2020-09-14, v3.19.0-rc1~116^2~2) broke linking of Qt
resources, such as the Add/Remove Entry button icons.
Fixes: #21682
This commit is contained in:
@@ -132,6 +132,7 @@ qt5_wrap_cpp(MOC_SRCS
|
|||||||
WarningMessagesDialog.h
|
WarningMessagesDialog.h
|
||||||
)
|
)
|
||||||
qt5_add_resources(RC_SRCS CMakeSetup.qrc)
|
qt5_add_resources(RC_SRCS CMakeSetup.qrc)
|
||||||
|
add_library(CMakeGUIQRCLib OBJECT ${RC_SRCS})
|
||||||
|
|
||||||
if (FALSE) # CMake's bootstrap binary does not support automoc
|
if (FALSE) # CMake's bootstrap binary does not support automoc
|
||||||
set(CMAKE_AUTOMOC 1)
|
set(CMAKE_AUTOMOC 1)
|
||||||
@@ -140,8 +141,7 @@ if (FALSE) # CMake's bootstrap binary does not support automoc
|
|||||||
else ()
|
else ()
|
||||||
list(APPEND SRCS
|
list(APPEND SRCS
|
||||||
${UI_SRCS}
|
${UI_SRCS}
|
||||||
${MOC_SRCS}
|
${MOC_SRCS})
|
||||||
${RC_SRCS})
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if(USE_LGPL)
|
if(USE_LGPL)
|
||||||
@@ -164,6 +164,7 @@ target_link_libraries(CMakeGUIMainLib PUBLIC CMakeGUILib)
|
|||||||
add_executable(cmake-gui WIN32 MACOSX_BUNDLE CMakeGUIExec.cxx ${MANIFEST_FILE})
|
add_executable(cmake-gui WIN32 MACOSX_BUNDLE CMakeGUIExec.cxx ${MANIFEST_FILE})
|
||||||
target_link_libraries(cmake-gui CMakeGUIMainLib Qt5::Core)
|
target_link_libraries(cmake-gui CMakeGUIMainLib Qt5::Core)
|
||||||
|
|
||||||
|
target_sources(CMakeGUIMainLib INTERFACE $<TARGET_OBJECTS:CMakeGUIQRCLib>)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_sources(CMakeGUIMainLib INTERFACE $<TARGET_OBJECTS:CMakeVersion> CMakeSetup.rc)
|
target_sources(CMakeGUIMainLib INTERFACE $<TARGET_OBJECTS:CMakeVersion> CMakeSetup.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user