Skip to content

Commit d7e8a8d

Browse files
committed
Manage stb dependency via vcpkg instead of FetchContent
1 parent f8162f3 commit d7e8a8d

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

cmake/stb.cmake

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
# TheSuperHackers @bobtista 02/11/2025
22
# STB single-file public domain libraries for image encoding
33
# https://github.com/nothings/stb
4+
# Managed via vcpkg - version pinned by builtin-baseline in vcpkg.json
45

5-
FetchContent_Declare(
6-
stb
7-
GIT_REPOSITORY https://github.com/nothings/stb.git
8-
GIT_TAG master # Could pin to specific commit for stability
9-
GIT_SHALLOW TRUE
10-
)
11-
12-
FetchContent_MakeAvailable(stb)
13-
14-
# Create interface library for stb headers
15-
add_library(stb INTERFACE)
16-
target_include_directories(stb INTERFACE ${stb_SOURCE_DIR})
17-
6+
find_package(Stb CONFIG REQUIRED)

vcpkg.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"builtin-baseline": "b02e341c927f16d991edbd915d8ea43eac52096c",
44
"dependencies": [
55
"zlib",
6-
"ffmpeg"
6+
"ffmpeg",
7+
"stb"
78
]
89
}

0 commit comments

Comments
 (0)