Skip to content

Commit

Permalink
deps(libpng): only build static libraries
Browse files Browse the repository at this point in the history
Previously, we were trying to install_local_dependency_libs a non-existent dynamic PNG, cuz I'd hardcoded -D PNG_SHARED=OFF instead of referencing ${PNG_BUILD_SHARED_LIBS}.
Now we're hardcoding PNG_BUILD_SHARED_LIBS to OFF and referencing the variable consistently throughout the rest of the script.

Signed-off-by: Zach Lewis <[email protected]>
  • Loading branch information
zachlewis committed Jan 8, 2025
1 parent f486fa0 commit 6ff021c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmake/build_PNG.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set_cache (PNG_BUILD_VERSION 1.6.44 "PNG version for local builds")
set (PNG_GIT_REPOSITORY "https://github.com/glennrp/libpng")
set (PNG_GIT_TAG "v${PNG_BUILD_VERSION}")

set_cache (PNG_BUILD_SHARED_LIBS ${LOCAL_BUILD_SHARED_LIBS_DEFAULT}
set_cache (PNG_BUILD_SHARED_LIBS OFF
DOC "Should execute a local PNG build, if necessary, build shared libraries" ADVANCED)

string (MAKE_C_IDENTIFIER ${PNG_BUILD_VERSION} PNG_VERSION_IDENT)
Expand All @@ -28,7 +28,7 @@ build_dependency_with_cmake (PNG
GIT_REPOSITORY ${PNG_GIT_REPOSITORY}
GIT_TAG ${PNG_GIT_TAG}
CMAKE_ARGS
-D PNG_SHARED=OFF
-D PNG_SHARED=${PNG_BUILD_SHARED_LIBS}
-D PNG_STATIC=ON
-D PNG_EXECUTABLES=OFF
-D PNG_TESTS=OFF
Expand Down

0 comments on commit 6ff021c

Please sign in to comment.