Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #11544 from jmallach/spng
Allow building against system libspng
  • Loading branch information
degasus committed Feb 9, 2023
2 parents aaad0cd + 4d164fc commit 17d7b75
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Expand Up @@ -800,7 +800,15 @@ else()
set(LZO lzo2)
endif()

add_subdirectory(Externals/libspng)
pkg_check_modules(pc_spng IMPORTED_TARGET spng)
if (pc_spng_FOUND AND TARGET PkgConfig::pc_spng)
message(STATUS "Using the system libspng")
set(spng_target PkgConfig::pc_spng)
else()
message(STATUS "Using static libspng from Externals")
add_subdirectory(Externals/libspng)
set(spng_target spng)
endif()

# Using static FreeSurround from Externals
# There is no system FreeSurround library.
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Common/CMakeLists.txt
Expand Up @@ -157,7 +157,7 @@ PRIVATE
${CURL_LIBRARIES}
FatFs
${ICONV_LIBRARIES}
spng
${spng_target}
${VTUNE_LIBRARIES}
)

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/InputCommon/CMakeLists.txt
Expand Up @@ -81,7 +81,7 @@ PUBLIC

PRIVATE
fmt::fmt
spng
${spng_target}
)

if(WIN32)
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/VideoCommon/CMakeLists.txt
Expand Up @@ -183,7 +183,7 @@ PUBLIC
core
PRIVATE
fmt::fmt
spng
${spng_target}
xxhash
imgui
implot
Expand Down

0 comments on commit 17d7b75

Please sign in to comment.