From e30b89607d77c5b5faad5bc3cff4ee6b5776e078 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Tue, 25 Nov 2025 16:26:03 +0100 Subject: [PATCH 1/2] [core] Add core headers to private CMake target FILE_SETS [libtextinput] add headers to public file_set, no longer need target_include_dir This is a non-functional change, it only improves the IDE experience. In the future, we could avoid copying headers to build-directory and verbose target_include_directory statements by just using the file_sets. Same with INSTALL, would go through headers. This could ultimately go into the ROOT custom macros, but for the moment let's only do the minimal changes for the IDE and let the rest for later. Also --- builtins/libtextinput/CMakeLists.txt | 30 ++++++++++++++++--- core/base/CMakeLists.txt | 26 ++++++++-------- core/clingutils/CMakeLists.txt | 13 ++++++++ core/cont/CMakeLists.txt | 17 +++++++++-- core/dictgen/CMakeLists.txt | 26 ++++++++++++++++ core/foundation/CMakeLists.txt | 27 ++++++++++++++++- core/gui/CMakeLists.txt | 16 ++++++++-- core/imt/CMakeLists.txt | 24 +++++++++++++-- core/lz4/CMakeLists.txt | 11 ++++++- core/lzma/CMakeLists.txt | 11 ++++++- core/macosx/CMakeLists.txt | 11 +++++++ core/meta/CMakeLists.txt | 16 ++++++++-- core/metacling/src/CMakeLists.txt | 28 +++++++++++++++++ core/multiproc/CMakeLists.txt | 34 ++++++++++++++++----- core/rint/CMakeLists.txt | 20 +++++++++++-- core/testsupport/CMakeLists.txt | 9 ++++++ core/textinput/CMakeLists.txt | 10 ++++++- core/thread/CMakeLists.txt | 45 +++++++++++++++++++--------- core/unix/CMakeLists.txt | 12 +++++++- core/winnt/CMakeLists.txt | 13 +++++++- core/zip/CMakeLists.txt | 10 ++++++- core/zstd/CMakeLists.txt | 11 ++++++- 22 files changed, 361 insertions(+), 59 deletions(-) diff --git a/builtins/libtextinput/CMakeLists.txt b/builtins/libtextinput/CMakeLists.txt index 935774880ae7e..5868f3daf24c3 100644 --- a/builtins/libtextinput/CMakeLists.txt +++ b/builtins/libtextinput/CMakeLists.txt @@ -26,10 +26,32 @@ target_sources(textinput PRIVATE TextInputContext.cpp TextInput.cpp UTF8.cpp -) - -target_include_directories(textinput PUBLIC - ./ # to be able to call #include "textinput/header.h" from ROOT core files + FILE_SET HEADERS + TYPE HEADERS + BASE_DIRS ./ # to be able to call #include "textinput/header.h" from ROOT core files + FILES + textinput/Callbacks.h + textinput/Callbacks.h + textinput/Color.h + textinput/Display.h + textinput/Editor.h + textinput/History.h + textinput/InputData.h + textinput/KeyBinding.h + textinput/Range.h + textinput/Reader.h + textinput/SignalHandler.h + textinput/StreamReader.h + textinput/StreamReaderUnix.h + textinput/StreamReaderWin.h + textinput/TerminalConfigUnix.h + textinput/TerminalDisplay.h + textinput/TerminalDisplayUnix.h + textinput/TerminalDisplayWin.h + textinput/Text.h + textinput/TextInputContext.h + textinput/TextInput.h ) + set_property(TARGET textinput PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/core/base/CMakeLists.txt b/core/base/CMakeLists.txt index 57d87d1e504fa..d3500b345981c 100644 --- a/core/base/CMakeLists.txt +++ b/core/base/CMakeLists.txt @@ -198,23 +198,23 @@ set(BASE_SOURCES src/TVirtualX.cxx ) -set(RELATIVE_BASE_INC_HEADERS ${BASE_HEADERS}) -list(TRANSFORM RELATIVE_BASE_INC_HEADERS PREPEND inc/) +set(RELATIVE_INC_HEADERS ${BASE_HEADERS}) +list(TRANSFORM RELATIVE_INC_HEADERS PREPEND inc/) # only here complete list of headers can be propogated to parent cmake file set_property(TARGET Core APPEND PROPERTY DICT_HEADERS ${BASE_HEADERS}) -target_sources(Core PRIVATE ${BASE_SOURCES}) - -target_sources( - Core - PRIVATE - FILE_SET private_header_files - TYPE HEADERS - BASE_DIRS inc/ src/ - FILES - ${RELATIVE_BASE_INC_HEADERS} - src/TListOfTypes.h +target_sources(Core +PRIVATE + ${BASE_SOURCES} +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ src/ + FILES + ${RELATIVE_INC_HEADERS} + inc/LinkDef.h + src/TListOfTypes.h ) target_include_directories(Core PUBLIC diff --git a/core/clingutils/CMakeLists.txt b/core/clingutils/CMakeLists.txt index 488fd018b6da3..9a1e721aa055f 100644 --- a/core/clingutils/CMakeLists.txt +++ b/core/clingutils/CMakeLists.txt @@ -25,6 +25,19 @@ ROOT_OBJECT_LIBRARY(ClingUtils src/TClingUtils.cxx ) +set(RELATIVE_RES_HEADERS RStl.h TClingUtils.h) +list(TRANSFORM RELATIVE_RES_HEADERS PREPEND res/) + +target_sources(ClingUtils +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS res/ inc/ + FILES + ${RELATIVE_RES_HEADERS} + inc/root_std_complex.h +) + if(NOT MSVC) target_compile_options(ClingUtils PRIVATE -Wno-error) endif() diff --git a/core/cont/CMakeLists.txt b/core/cont/CMakeLists.txt index 421f8e8f0bee3..74a421a510b75 100644 --- a/core/cont/CMakeLists.txt +++ b/core/cont/CMakeLists.txt @@ -7,8 +7,7 @@ ############################################################################ # CMakeLists.txt file for building ROOT core/cont package ############################################################################ - -set_property(TARGET Core APPEND PROPERTY DICT_HEADERS +set(CONT_HEADERS ROOT/TSeq.hxx TArrayC.h TArrayD.h @@ -40,7 +39,13 @@ set_property(TARGET Core APPEND PROPERTY DICT_HEADERS TVirtualCollectionProxy.h ) -target_sources(Core PRIVATE +set_property(TARGET Core APPEND PROPERTY DICT_HEADERS ${CONT_HEADERS}) + +set(RELATIVE_INC_HEADERS ${CONT_HEADERS}) +list(TRANSFORM RELATIVE_INC_HEADERS PREPEND inc/) + +target_sources(Core +PRIVATE src/TArrayC.cxx src/TArray.cxx src/TArrayD.cxx @@ -67,6 +72,12 @@ target_sources(Core PRIVATE src/TRefTable.cxx src/TSeqCollection.cxx src/TSortedList.cxx +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ + FILES + ${RELATIVE_INC_HEADERS} ) target_include_directories(Core diff --git a/core/dictgen/CMakeLists.txt b/core/dictgen/CMakeLists.txt index b00a26a73dd4d..d3b3f839c5594 100644 --- a/core/dictgen/CMakeLists.txt +++ b/core/dictgen/CMakeLists.txt @@ -27,6 +27,32 @@ ROOT_OBJECT_LIBRARY(Dictgen XMLReader.cxx ) +set(DICTGEN_HEADERS + BaseSelectionRule.h + ClassSelectionRule.h + cygpath.h + DictSelectionReader.h + LinkdefReader.h + rootcling_impl.h + Scanner.h + SelectionRules.h + TModuleGenerator.h + VariableSelectionRule.h + XMLReader.h +) + +set(RELATIVE_RES_HEADERS ${DICTGEN_HEADERS}) +list(TRANSFORM RELATIVE_RES_HEADERS PREPEND res/) + +target_sources(Dictgen +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS res/ + FILES + ${RELATIVE_RES_HEADERS} +) + # This directory contains files that include llvm, which can give warnings. if(NOT MSVC) target_compile_options(Dictgen PRIVATE -Wno-error) diff --git a/core/foundation/CMakeLists.txt b/core/foundation/CMakeLists.txt index 044b1fad1e05e..1ab8de1c2ef1a 100644 --- a/core/foundation/CMakeLists.txt +++ b/core/foundation/CMakeLists.txt @@ -8,7 +8,7 @@ # CMakeLists.txt file for building ROOT core/foundation package ############################################################################ -set_property(TARGET Core APPEND PROPERTY DICT_HEADERS +set(FOUNDATION_HEADERS ESTLType.h TClassEdit.h TError.h @@ -25,6 +25,8 @@ set_property(TARGET Core APPEND PROPERTY DICT_HEADERS ROOT/TypeTraits.hxx ) +set_property(TARGET Core APPEND PROPERTY DICT_HEADERS ${FOUNDATION_HEADERS}) + set(FOUNDATION_SOURCES src/FoundationUtils.cxx src/RConversionRuleParser.cxx @@ -61,5 +63,28 @@ set_target_properties(Foundation_Stage1 PROPERTIES VISIBILITY_INLINES_HIDDEN "ON" ) + +set(RELATIVE_INC_HEADERS ${FOUNDATION_HEADERS}) +list(TRANSFORM RELATIVE_INC_HEADERS PREPEND inc/) + +target_sources( + Foundation_Stage1 + PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ + FILES + ${RELATIVE_INC_HEADERS} +) +target_sources( + Core + PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ + FILES + ${RELATIVE_INC_HEADERS} +) + ROOT_INSTALL_HEADERS(${FOUNDATION_HEADER_DIRS}) ROOT_ADD_TEST_SUBDIRECTORY(test) diff --git a/core/gui/CMakeLists.txt b/core/gui/CMakeLists.txt index b51d25f3a6046..9d8fe42fd4746 100644 --- a/core/gui/CMakeLists.txt +++ b/core/gui/CMakeLists.txt @@ -8,7 +8,7 @@ # CMakeLists.txt file for building ROOT core/meta package ############################################################################ -set_property(TARGET Core APPEND PROPERTY DICT_HEADERS +set(GUI_HEADERS GuiTypes.h TApplicationImp.h TBrowser.h @@ -25,7 +25,13 @@ set_property(TARGET Core APPEND PROPERTY DICT_HEADERS TToggle.h ) -target_sources(Core PRIVATE +set_property(TARGET Core APPEND PROPERTY DICT_HEADERS ${GUI_HEADERS}) + +set(RELATIVE_INC_HEADERS ${GUI_HEADERS}) +list(TRANSFORM RELATIVE_INC_HEADERS PREPEND inc/) + +target_sources(Core +PRIVATE src/InitGui.cxx src/TApplicationImp.cxx src/TBrowser.cxx @@ -40,6 +46,12 @@ target_sources(Core PRIVATE src/TObjectSpy.cxx src/TToggle.cxx src/TToggleGroup.cxx +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ + FILES + ${RELATIVE_INC_HEADERS} ) target_include_directories(Core PUBLIC diff --git a/core/imt/CMakeLists.txt b/core/imt/CMakeLists.txt index e042fab222151..dfb474be88c9b 100644 --- a/core/imt/CMakeLists.txt +++ b/core/imt/CMakeLists.txt @@ -25,14 +25,16 @@ target_link_libraries(Imt PRIVATE Thread INTERFACE Core) if(imt) target_link_libraries(Imt PRIVATE TBB::tbb) - - ROOT_GENERATE_DICTIONARY(G__Imt STAGE1 + set(IMT_HEADERS ROOT/TTaskGroup.hxx ROOT/RTaskArena.hxx ROOT/RSlotStack.hxx ROOT/TExecutor.hxx ROOT/TThreadExecutor.hxx ROOT/InternalIMTUtils.hxx + ) + ROOT_GENERATE_DICTIONARY(G__Imt STAGE1 + ${IMT_HEADERS} LINKDEF LinkDef.h MODULE @@ -53,8 +55,11 @@ if(imt) ROOT_ADD_TEST_SUBDIRECTORY(test) else() - ROOT_GENERATE_DICTIONARY(G__Imt STAGE1 + set(IMT_HEADERS ROOT/TExecutor.hxx + ) + ROOT_GENERATE_DICTIONARY(G__Imt STAGE1 + ${IMT_HEADERS} LINKDEF LinkDef.h MODULE @@ -65,4 +70,17 @@ else() ) endif() +set(RELATIVE_INC_HEADERS ${IMT_HEADERS}) +list(TRANSFORM RELATIVE_INC_HEADERS PREPEND inc/) + +target_sources(Imt +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ + FILES + ${RELATIVE_INC_HEADERS} + inc/LinkDef.h +) + ROOT_INSTALL_HEADERS() diff --git a/core/lz4/CMakeLists.txt b/core/lz4/CMakeLists.txt index ca23f250b59e1..b96970810292d 100644 --- a/core/lz4/CMakeLists.txt +++ b/core/lz4/CMakeLists.txt @@ -4,7 +4,16 @@ # For the licensing terms see $ROOTSYS/LICENSE. # For the list of contributors see $ROOTSYS/README/CREDITS. -target_sources(Core PRIVATE src/ZipLZ4.cxx) +target_sources(Core +PRIVATE + src/ZipLZ4.cxx +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ + FILES + inc/ZipLZ4.h +) target_link_libraries(Core PRIVATE xxHash::xxHash LZ4::LZ4) target_include_directories(Core PUBLIC $ diff --git a/core/lzma/CMakeLists.txt b/core/lzma/CMakeLists.txt index f19eec364cb8d..3238ebf8724b8 100644 --- a/core/lzma/CMakeLists.txt +++ b/core/lzma/CMakeLists.txt @@ -8,7 +8,16 @@ # CMakeLists.txt file for building ROOT core/lzma package ############################################################################ -target_sources(Core PRIVATE src/ZipLZMA.c) +target_sources(Core +PRIVATE + src/ZipLZMA.c +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ + FILES + inc/ZipLZMA.h +) target_link_libraries(Core PRIVATE LibLZMA::LibLZMA) diff --git a/core/macosx/CMakeLists.txt b/core/macosx/CMakeLists.txt index c01f45cf0cb54..70db852a32648 100644 --- a/core/macosx/CMakeLists.txt +++ b/core/macosx/CMakeLists.txt @@ -36,6 +36,17 @@ if(cocoa) target_sources(Core PRIVATE $) + target_sources(Macosx + PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ + FILES + inc/CocoaUtils.h + inc/TMacOSXSystem.h + inc/LinkDef.h + ) + endif() ROOT_INSTALL_HEADERS() diff --git a/core/meta/CMakeLists.txt b/core/meta/CMakeLists.txt index 8e010343a9a34..23a1689784e79 100644 --- a/core/meta/CMakeLists.txt +++ b/core/meta/CMakeLists.txt @@ -8,7 +8,7 @@ # CMakeLists.txt file for building ROOT core/meta package ############################################################################ -set_property(TARGET Core APPEND PROPERTY DICT_HEADERS +set(META_HEADERS TBaseClass.h TClassGenerator.h TClass.h @@ -52,7 +52,13 @@ set_property(TARGET Core APPEND PROPERTY DICT_HEADERS TVirtualObject.h ) -target_sources(Core PRIVATE +set_property(TARGET Core APPEND PROPERTY DICT_HEADERS ${META_HEADERS}) + +set(RELATIVE_INC_HEADERS ${META_HEADERS}) +list(TRANSFORM RELATIVE_INC_HEADERS PREPEND inc/) + +target_sources(Core +PRIVATE src/TBaseClass.cxx src/TClass.cxx src/TClassGenerator.cxx @@ -86,6 +92,12 @@ target_sources(Core PRIVATE src/TViewPubDataMembers.cxx src/TViewPubFunctions.cxx src/TVirtualStreamerInfo.cxx +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ + FILES + ${RELATIVE_INC_HEADERS} ) target_include_directories(Core diff --git a/core/metacling/src/CMakeLists.txt b/core/metacling/src/CMakeLists.txt index 0c984408c385b..e84ba422b874a 100644 --- a/core/metacling/src/CMakeLists.txt +++ b/core/metacling/src/CMakeLists.txt @@ -37,6 +37,34 @@ ROOT_OBJECT_LIBRARY(MetaCling TClingValue.cxx ) +set (METACLING_HEADERS + ClingRAII.h + TClingBaseClassInfo.h + TClingCallbacks.h + TClingCallFunc.h + TClingClassInfo.h + TClingDataMemberInfo.h + TClingDeclInfo.h + TClingDiagnostics.h + TCling.h + TClingMemberIter.h + TClingMethodArgInfo.h + TClingMethodInfo.h + TClingRdictModuleFileExtension.h + TClingTypedefInfo.h + TClingTypeInfo.h + TClingValue.h +) + +target_sources(MetaCling +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS ./ + FILES + ${METACLING_HEADERS} +) + # This directory contains files that include llvm, which can give warnings. if(NOT MSVC) target_compile_options(MetaCling PRIVATE -Wno-error) diff --git a/core/multiproc/CMakeLists.txt b/core/multiproc/CMakeLists.txt index b506d8de530e4..1e66f6f56a9df 100644 --- a/core/multiproc/CMakeLists.txt +++ b/core/multiproc/CMakeLists.txt @@ -12,16 +12,21 @@ if(WIN32) return() endif() + +set(MULTIPROC_HEADERS + MPCode.h + MPSendRecv.h + PoolUtils.h + TMPClient.h + TMPWorker.h + TMPWorkerExecutor.h + TProcPool.h + ROOT/TProcessExecutor.hxx +) + ROOT_STANDARD_LIBRARY_PACKAGE(MultiProc STAGE1 HEADERS - MPCode.h - MPSendRecv.h - PoolUtils.h - TMPClient.h - TMPWorker.h - TMPWorkerExecutor.h - TProcPool.h - ROOT/TProcessExecutor.hxx + ${MULTIPROC_HEADERS} SOURCES src/MPSendRecv.cxx src/TMPClient.cxx @@ -33,3 +38,16 @@ ROOT_STANDARD_LIBRARY_PACKAGE(MultiProc STAGE1 Core Net ) + +set(RELATIVE_INC_HEADERS ${MULTIPROC_HEADERS}) +list(TRANSFORM RELATIVE_INC_HEADERS PREPEND inc/) + +target_sources(MultiProc +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ + FILES + ${RELATIVE_INC_HEADERS} + inc/LinkDef.h +) diff --git a/core/rint/CMakeLists.txt b/core/rint/CMakeLists.txt index 80e9aea0e0fe6..4b2e925b7ab44 100644 --- a/core/rint/CMakeLists.txt +++ b/core/rint/CMakeLists.txt @@ -8,11 +8,15 @@ # CMakeLists.txt file for building ROOT core/rint package ############################################################################ +set(RINT_HEADERS + TRint.h + TTabCom.h +) + ROOT_STANDARD_LIBRARY_PACKAGE(Rint STAGE1 HEADERS - TRint.h - TTabCom.h + ${RINT_HEADERS} SOURCES src/TRint.cxx src/TTabCom.cxx @@ -23,5 +27,17 @@ ROOT_STANDARD_LIBRARY_PACKAGE(Rint ) target_include_directories(Core PRIVATE inc) +set(RELATIVE_INC_HEADERS ${RINT_HEADERS}) +list(TRANSFORM RELATIVE_INC_HEADERS PREPEND inc/) + +target_sources(Rint +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ + FILES + ${RELATIVE_INC_HEADERS} + inc/LinkDef.h +) ROOT_ADD_TEST_SUBDIRECTORY(test) diff --git a/core/testsupport/CMakeLists.txt b/core/testsupport/CMakeLists.txt index eaa1b032e0451..eeccaa334334a 100644 --- a/core/testsupport/CMakeLists.txt +++ b/core/testsupport/CMakeLists.txt @@ -26,6 +26,15 @@ install(TARGETS ${libname} PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${header_dir}) set_property(GLOBAL APPEND PROPERTY ROOT_EXPORTED_TARGETS ${libname}) +target_sources(${libname} +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/${header_dir} + FILES + inc/${header_dir}/TestSupport.hxx +) + # Make it usable inside and outside of ROOT under a single name if somebody writes their own tests using ROOT_ADD_GTEST add_library(ROOT::TestSupport ALIAS ${libname}) diff --git a/core/textinput/CMakeLists.txt b/core/textinput/CMakeLists.txt index 1eca468a751b5..f15e401258231 100644 --- a/core/textinput/CMakeLists.txt +++ b/core/textinput/CMakeLists.txt @@ -10,9 +10,17 @@ set_property(TARGET Core APPEND PROPERTY DICT_HEADERS Getline.h) -target_sources(Core PRIVATE +target_sources(Core +PRIVATE src/Getline_color.cxx src/Getline.cxx +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ src/ + FILES + inc/Getline.h + src/Getline_color.h ) target_include_directories(Core diff --git a/core/thread/CMakeLists.txt b/core/thread/CMakeLists.txt index 66e0540881cdb..3d191868c8dad 100644 --- a/core/thread/CMakeLists.txt +++ b/core/thread/CMakeLists.txt @@ -26,23 +26,27 @@ else() ) endif() +set(THREAD_HEADERS + TAtomicCount.h + TCondition.h + TConditionImp.h + TMutex.h + TMutexImp.h + TRWLock.h + TSemaphore.h + TThreadFactory.h + TThread.h + TThreadImp.h + TThreadPool.h + ROOT/TRWSpinLock.hxx + ROOT/TSpinMutex.hxx + ROOT/TThreadedObject.hxx +) + ROOT_STANDARD_LIBRARY_PACKAGE(Thread HEADERS ${PLATFORM_HEADERS} - TAtomicCount.h - TCondition.h - TConditionImp.h - TMutex.h - TMutexImp.h - TRWLock.h - TSemaphore.h - TThreadFactory.h - TThread.h - TThreadImp.h - TThreadPool.h - ROOT/TRWSpinLock.hxx - ROOT/TSpinMutex.hxx - ROOT/TThreadedObject.hxx + ${THREAD_HEADERS} SOURCES src/TCondition.cxx src/TConditionImp.cxx @@ -68,6 +72,19 @@ target_include_directories(Core PUBLIC $ ) +set(RELATIVE_INC_HEADERS ${PLATFORM_HEADERS} ${THREAD_HEADERS}) +list(TRANSFORM RELATIVE_INC_HEADERS PREPEND inc/) + +target_sources(Thread +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ + FILES + ${RELATIVE_INC_HEADERS} + inc/LinkDef.h +) + target_link_libraries(Thread PUBLIC ${CMAKE_THREAD_LIBS_INIT}) target_include_directories(Thread PUBLIC diff --git a/core/unix/CMakeLists.txt b/core/unix/CMakeLists.txt index 7c66f7b7cbbab..b82f1ed2ddc28 100644 --- a/core/unix/CMakeLists.txt +++ b/core/unix/CMakeLists.txt @@ -13,7 +13,17 @@ if(NOT UNIX) endif() set_property(TARGET Core APPEND PROPERTY DICT_HEADERS TUnixSystem.h) -target_sources(Core PRIVATE src/TUnixSystem.cxx) +target_sources(Core +PRIVATE + src/TUnixSystem.cxx +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ + FILES + inc/TUnixSystem.h + inc/LinkDef.h +) target_include_directories(Core PRIVATE inc ../../builtins/clib/res) if (CMAKE_SYSTEM_NAME MATCHES FreeBSD) diff --git a/core/winnt/CMakeLists.txt b/core/winnt/CMakeLists.txt index e5810ab8ecb4a..e3d0774225c9a 100644 --- a/core/winnt/CMakeLists.txt +++ b/core/winnt/CMakeLists.txt @@ -14,10 +14,21 @@ endif() set_property(TARGET Core APPEND PROPERTY DICT_HEADERS TWinNTSystem.h) -target_sources(Core PRIVATE +target_sources(Core +PRIVATE src/TWin32SplashThread.cxx src/TWinNTSystem.cxx src/Win32Splash.cxx +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ + FILES + inc/TWin32SplashThread.h + inc/TWinNTSystem.h + inc/Win32Constants.h + inc/Windows4Root.h + inc/LinkDef.h ) target_link_libraries(Core PRIVATE diff --git a/core/zip/CMakeLists.txt b/core/zip/CMakeLists.txt index 70716436263b8..03a00d4ce87ab 100644 --- a/core/zip/CMakeLists.txt +++ b/core/zip/CMakeLists.txt @@ -4,9 +4,17 @@ # For the licensing terms see $ROOTSYS/LICENSE. # For the list of contributors see $ROOTSYS/README/CREDITS. -target_sources(Core PRIVATE +target_sources(Core +PRIVATE src/Compression.cxx src/RZip.cxx +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ + FILES + inc/Compression.h + inc/RZip.h ) target_link_libraries(Core PRIVATE ZLIB::ZLIB) diff --git a/core/zstd/CMakeLists.txt b/core/zstd/CMakeLists.txt index 899fcc8dbd3e7..c94448a2e8e93 100644 --- a/core/zstd/CMakeLists.txt +++ b/core/zstd/CMakeLists.txt @@ -2,7 +2,16 @@ # CMakeLists.txt file for building ROOT core/zstd package ############################################################################ -target_sources(Core PRIVATE src/ZipZSTD.cxx) +target_sources(Core +PRIVATE + src/ZipZSTD.cxx +PRIVATE + FILE_SET private_header_files + TYPE HEADERS + BASE_DIRS inc/ + FILES + inc/ZipZSTD.h +) target_link_libraries(Core PRIVATE ZSTD::ZSTD) From fb87d0cabf8f59c0453b53ebdb58ac29d8398e74 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Mon, 2 Nov 2026 09:48:15 +0100 Subject: [PATCH 2/2] fix duplicate Co-authored-by: Jonas Rembser --- builtins/libtextinput/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/builtins/libtextinput/CMakeLists.txt b/builtins/libtextinput/CMakeLists.txt index 5868f3daf24c3..1e60bc45fa444 100644 --- a/builtins/libtextinput/CMakeLists.txt +++ b/builtins/libtextinput/CMakeLists.txt @@ -31,7 +31,6 @@ target_sources(textinput PRIVATE TYPE HEADERS BASE_DIRS ./ # to be able to call #include "textinput/header.h" from ROOT core files FILES - textinput/Callbacks.h textinput/Callbacks.h textinput/Color.h textinput/Display.h