Skip to content

Commit

Permalink
deps(PNG): force build recipe to always (re)find the static PNG libs
Browse files Browse the repository at this point in the history
Signed-off-by: Zach Lewis <[email protected]>
  • Loading branch information
zachlewis committed Sep 24, 2024
1 parent fc10c76 commit fb520a7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 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 #${LOCAL_BUILD_SHARED_LIBS_DEFAULT}
DOC "Should execute a local PNG build, if necessary, build shared libraries" ADVANCED)

string (MAKE_C_IDENTIFIER ${PNG_BUILD_VERSION} PNG_VERSION_IDENT)
Expand Down Expand Up @@ -38,8 +38,12 @@ set (PNG_REFIND_VERSION ${PNG_BUILD_VERSION})

# If building PNG >= 1.6.44, refind with PNG's CMake Config
if (${PNG_BUILD_VERSION} VERSION_GREATER_EQUAL 1.6.44)
set(PNG_REFIND_ARGS CONFIG)
message (STATUS "PNG ${PNG_BUILD_VERSION} >= 1.6.44, refinding with CMake Config")
set(_refind_config CONFIG)
endif ()
set(PNG_REFIND_ARGS ${_refind_config}
COMPONENTS STATIC
)

if (PNG_BUILD_SHARED_LIBS)
install_local_dependency_libs (PNG PNG)
Expand Down

0 comments on commit fb520a7

Please sign in to comment.