From 89a1e1c1be9ea7519b0c52d30087d95062a091d1 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Sun, 21 Aug 2022 07:11:38 +0400 Subject: Build: Link w/ `OBJECT` library is OK since 3.12 --- Source/CMakeLists.txt | 2 +- Source/QtDialog/CMakeLists.txt | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 67b2fd9..de3ce15 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -1211,7 +1211,7 @@ if(WIN32) add_library(CMakeVersion OBJECT "${CMAKE_CURRENT_BINARY_DIR}/CMakeVersion.rc") set_property(TARGET CMakeVersion PROPERTY INCLUDE_DIRECTORIES "") foreach(_tool IN LISTS _tools) - target_sources(${_tool} PRIVATE $) + target_link_libraries(${_tool} PRIVATE CMakeVersion) endforeach() endif() diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 009154c..2766db8 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -250,14 +250,19 @@ if(USE_LGPL) endif() add_library(CMakeGUIMainLib STATIC CMakeSetup.cxx) -target_link_libraries(CMakeGUIMainLib PUBLIC CMakeGUILib) +target_link_libraries( + CMakeGUIMainLib + PUBLIC + CMakeGUILib + CMakeGUIQRCLib + $ + ) add_executable(cmake-gui WIN32 MACOSX_BUNDLE CMakeGUIExec.cxx) target_link_libraries(cmake-gui CMakeGUIMainLib ManifestLib Qt${INSTALLED_QT_VERSION}::Core) -target_sources(CMakeGUIMainLib INTERFACE $) if(WIN32) - target_sources(CMakeGUIMainLib INTERFACE $ CMakeSetup.rc) + target_sources(CMakeGUIMainLib INTERFACE CMakeSetup.rc) endif() if(APPLE) target_sources(CMakeGUIMainLib INTERFACE CMakeSetup.icns) -- cgit v0.12