From 440822fa5c137b11a80307fd9367e50345822f41 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 5 Oct 2022 12:51:44 -0400 Subject: Source: Fix regression causing CMakeLib sources to be compiled repeatedly In commit 4ff8604604 (Build: Do not use variables for sources lists, 2022-08-21) the sources of `CMakeLib` were accidentally made PUBLIC. This causes them to be compiled again in all consuming targets. Make the sources PRIVATE instead. --- Source/CMakeLists.txt | 24 ++++++++++++------------ Source/QtDialog/CMakeLists.txt | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 8f2a5cb..c268a92 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -766,7 +766,7 @@ target_link_libraries( if(CMake_USE_MACH_PARSER) target_sources( CMakeLib - PUBLIC + PRIVATE cmMachO.h cmMachO.cxx ) @@ -776,7 +776,7 @@ endif() if(CMake_USE_XCOFF_PARSER) target_sources( CMakeLib - PUBLIC + PRIVATE cmXCOFF.h cmXCOFF.cxx ) @@ -786,7 +786,7 @@ endif() if(APPLE) target_sources( CMakeLib - PUBLIC + PRIVATE cmXCodeObject.cxx cmXCode21Object.cxx cmXCodeScheme.cxx @@ -800,7 +800,7 @@ endif() if(WIN32) target_sources( CMakeLib - PUBLIC + PRIVATE cmCallVisualStudioMacro.cxx cmCallVisualStudioMacro.h ) @@ -808,7 +808,7 @@ if(WIN32) if(NOT UNIX) target_sources( CMakeLib - PUBLIC + PRIVATE cmGlobalBorlandMakefileGenerator.cxx cmGlobalBorlandMakefileGenerator.h cmGlobalMSYSMakefileGenerator.cxx @@ -871,7 +871,7 @@ endif() if(CMAKE_USE_WMAKE) target_sources( CMakeLib - PUBLIC + PRIVATE cmGlobalWatcomWMakeGenerator.cxx cmGlobalWatcomWMakeGenerator.h ) @@ -882,7 +882,7 @@ endif() if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux") target_sources( CMakeLib - PUBLIC + PRIVATE cmGlobalGhsMultiGenerator.cxx cmGlobalGhsMultiGenerator.h cmLocalGhsMultiGenerator.cxx @@ -1045,7 +1045,7 @@ option(CPACK_ENABLE_FREEBSD_PKG "Add FreeBSD pkg(8) generator to CPack." OFF) if(UNIX) target_sources( CPackLib - PUBLIC + PRIVATE CPack/cmCPackRPMGenerator.cxx ) @@ -1063,7 +1063,7 @@ if(UNIX) DOC "FreeBSD pkg(8) library") if(FREEBSD_PKG_LIBRARIES) set(ENABLE_BUILD_FREEBSD_PKG 1) - target_sources(CPackLib PUBLIC CPack/cmCPackFreeBSDGenerator.cxx) + target_sources(CPackLib PRIVATE CPack/cmCPackFreeBSDGenerator.cxx) target_include_directories(CPackLib PUBLIC ${FREEBSD_PKG_INCLUDE_DIRS}) target_link_libraries(CPackLib PUBLIC ${FREEBSD_PKG_LIBRARIES}) endif() @@ -1081,7 +1081,7 @@ endif() if(CYGWIN) target_sources( CPackLib - PUBLIC + PRIVATE CPack/cmCPackCygwinBinaryGenerator.cxx CPack/cmCPackCygwinSourceGenerator.cxx ) @@ -1092,7 +1092,7 @@ if(WIN32 OR (CYGWIN AND TARGET LibUUID::LibUUID)) set(ENABLE_BUILD_WIX_GENERATOR 1) target_sources( CPackLib - PUBLIC + PRIVATE CPack/WiX/cmCMakeToWixPath.cxx CPack/WiX/cmCMakeToWixPath.h CPack/WiX/cmCPackWIXGenerator.cxx @@ -1122,7 +1122,7 @@ endif() if(APPLE) target_sources( CPackLib - PUBLIC + PRIVATE CPack/cmCPackBundleGenerator.cxx CPack/cmCPackDragNDropGenerator.cxx CPack/cmCPackPKGGenerator.cxx diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 989a929..a41b237 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -235,7 +235,7 @@ if(FALSE) # CMake's bootstrap binary does not support automoc else() target_sources( CMakeGUILib - PUBLIC + PRIVATE ${UI_BUILT_SRCS} ${MOC_BUILT_SRCS} ) -- cgit v0.12