Skip to content

Conversation

@xezon
Copy link

@xezon xezon commented Jan 11, 2026

This change exposes the sources files of interface libraries core_utility, corei/gi/zi_libraries_include in the Visual Studio solution.

Previously they were not explicitly listed which in turn hides them from search in Visual Studio.

I am not sure if this covers all files, but these are the ones I noticed and are most frequented.

image

…, corei/gi/zi_libraries_include in Visual Studio solution
@xezon xezon added Build Anything related to building, compiling Fix Is fixing something, but is not user facing labels Jan 11, 2026
@greptile-apps
Copy link

greptile-apps bot commented Jan 11, 2026

Greptile Overview

Greptile Summary

This PR exposes header files from INTERFACE libraries in the Visual Studio solution by adding target_sources calls with PRIVATE visibility, making these files searchable and navigable in the IDE.

Key Changes:

  • Added target_sources to core_utility, core_utility_no_pch, corei_libraries_include, gi_libraries_include, and zi_libraries_include INTERFACE libraries
  • Exposed 17 utility compatibility headers (compat.h, CppMacros.h, etc.) in Dependencies/Utility
  • Exposed 3 core headers (BaseTypeCore.h, debug.h, profile.h) in Core
  • Exposed 2 game-specific headers (BaseType.h, trig.h) in Generals and GeneralsMD
  • Reorganized target_link_libraries placement in Generals/GeneralsMD CMakeLists (moved after compile definitions)

Technical Assessment:
The use of target_sources with PRIVATE visibility on INTERFACE libraries is valid CMake syntax for IDE integration - it associates source files with the target for IDE purposes without affecting compilation. All referenced files exist and the changes improve developer experience without modifying build behavior.

Confidence Score: 5/5

  • This PR is safe to merge with no identified risks
  • The changes are purely build system metadata updates that improve IDE integration without affecting compilation or runtime behavior. All referenced files exist, the CMake syntax is valid, and the pattern of using target_sources with PRIVATE visibility on INTERFACE libraries is a standard CMake approach for exposing files to IDEs.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
Dependencies/Utility/CMakeLists.txt 5/5 Added UTILITY_SRC variable and exposed header files via target_sources for both core_utility and core_utility_no_pch interface libraries
Core/CMakeLists.txt 5/5 Added target_sources to expose three header files (BaseTypeCore.h, debug.h, profile.h) in corei_libraries_include interface library
Generals/Code/CMakeLists.txt 5/5 Added target_sources to expose two header files and reorganized target_link_libraries placement for gi_gameengine_include
GeneralsMD/Code/CMakeLists.txt 5/5 Added target_sources to expose two header files and reorganized target_link_libraries placement for zi_gameengine_include

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant VS as Visual Studio
    participant CMake as CMake Build System
    participant IL as Interface Libraries
    participant Files as Header Files
    
    Dev->>CMake: Configure CMakeLists.txt with target_sources
    CMake->>IL: Create INTERFACE libraries (core_utility, corei/gi/zi_libraries_include)
    CMake->>IL: Apply target_sources(... PRIVATE headers)
    IL->>Files: Attach header files to library metadata
    Files->>VS: Expose files in solution explorer
    VS->>Dev: Display files for search and navigation
    Dev->>VS: Search across exposed header files
    VS->>Dev: Return search results from interface library headers
Loading

@bobtista
Copy link

LGTM. Seems like Dependencies/Utility, Core/Libraries/Include, Generals/Code/Libraries/Include, and GeneralsMD/Code/Libraries/Include are fully covered.

@xezon
Copy link
Author

xezon commented Jan 14, 2026

I need an Approval.

Copy link

@Mauller Mauller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need an Approval.

Dance for me munkee

@xezon xezon merged commit 5e016fb into TheSuperHackers:main Jan 15, 2026
23 checks passed
@xezon xezon deleted the xezon/refactor-core-utility-cmake branch January 15, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build Anything related to building, compiling Fix Is fixing something, but is not user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants