Skip to content

build(cmake): Fetch DX9 SDK via FetchContent instead of hardcoded path - #3

Closed
bobtista wants to merge 1 commit into
Ronnin2011:mainfrom
bobtista:bobtista/build/dx9-sdk-fetchcontent
Closed

build(cmake): Fetch DX9 SDK via FetchContent instead of hardcoded path#3
bobtista wants to merge 1 commit into
Ronnin2011:mainfrom
bobtista:bobtista/build/dx9-sdk-fetchcontent

Conversation

@bobtista

@bobtista bobtista commented Apr 9, 2026

Copy link
Copy Markdown

Summary

  • Replaces the hardcoded C:/Program Files (x86)/Microsoft DirectX SDK (June 2010) dependency in cmake/dx9.cmake with CMake FetchContent using stephanmeesters/min-dx9-sdk, a minimal DX9 SDK repo (294 KB) containing headers and x86 libs
  • Allows the project to build out of the box without requiring a manual SDK installation
  • Adds d3d8lib alias target so GUIEdit and WorldBuilder (which still reference d3d8lib) link correctly through the DX9 SDK
  • Guards all DX8 alias targets with if(NOT TARGET ...) to avoid conflicts with MinGW builds

This follows the same FetchContent pattern that upstream TheSuperHackers uses for the DX8 SDK via min-dx8-sdk.

Test plan

  • Verify cmake configure succeeds without the June 2010 SDK installed
  • Verify Generals builds and links correctly
  • Verify GeneralsMD builds and links correctly
  • Verify WorldBuilder and GUIEdit build (they reference d3d8lib)

Replace the hardcoded "C:/Program Files (x86)/Microsoft DirectX SDK
(June 2010)" dependency with CMake FetchContent using
stephanmeesters/min-dx9-sdk. This allows the project to build out of
the box without requiring a manual SDK installation.

Also adds a d3d8lib alias target so that GUIEdit and WorldBuilder
(which still reference d3d8lib) link correctly through the DX9 SDK.
@bobtista bobtista changed the title Fetch DX9 SDK via FetchContent instead of hardcoded path build(cmake): Fetch DX9 SDK via FetchContent instead of hardcoded path Apr 9, 2026
@bobtista bobtista closed this Jun 8, 2026
@bobtista
bobtista deleted the bobtista/build/dx9-sdk-fetchcontent branch June 8, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant