Skip to content

Commit c5ebd91

Browse files
committed
FIX: an attempt to properly declare stb library
1 parent 20df01a commit c5ebd91

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ option(AGS_USE_LOCAL_SDL2 "Use a locally installed SDL2" ${AGS_USE_LOCAL_ALL_LIB
2020
option(AGS_USE_LOCAL_SDL2_SOUND "Use a locally installed SDL2 Sound" ${AGS_USE_LOCAL_ALL_LIBRARIES})
2121
option(AGS_USE_LOCAL_GLM "Use a locally installed GLM" ${AGS_USE_LOCAL_ALL_LIBRARIES})
2222
option(AGS_USE_LOCAL_MINIZ "Use a locally installed Miniz" ${AGS_USE_LOCAL_ALL_LIBRARIES})
23+
option(AGS_USE_LOCAL_STB "Use a locally installed STB" ${AGS_USE_LOCAL_ALL_LIBRARIES})
2324
option(AGS_USE_LOCAL_TINYXML2 "Use a locally installed TinyXML2" ${AGS_USE_LOCAL_ALL_LIBRARIES})
2425
option(AGS_USE_LOCAL_OGG "Use a locally installed OGG" ${AGS_USE_LOCAL_ALL_LIBRARIES})
2526
option(AGS_USE_LOCAL_THEORA "Use a locally installed Theora" ${AGS_USE_LOCAL_ALL_LIBRARIES})
@@ -338,6 +339,11 @@ else()
338339
find_package(miniz REQUIRED)
339340
add_library(MiniZ::MiniZ ALIAS miniz::miniz)
340341
endif()
342+
if (NOT AGS_USE_LOCAL_STB)
343+
add_subdirectory(libsrc/stb EXCLUDE_FROM_ALL)
344+
else()
345+
find_package(stb REQUIRED)
346+
endif()
341347

342348
add_subdirectory(Common/libsrc/aastr-0.1.1 EXCLUDE_FROM_ALL)
343349

libsrc/stb/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,4 @@ set_target_properties(stb PROPERTIES
77

88
target_include_directories(stb PUBLIC . )
99

10-
target_sources(stb
11-
PRIVATE
12-
stb_image.h
13-
)
14-
1510
add_library(stb::stb ALIAS stb)

0 commit comments

Comments
 (0)