diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-12-13 19:19:54 -0800 |
---|---|---|
committer | Rosen Penev <rosenp@gmail.com> | 2020-12-13 19:52:04 -0800 |
commit | f50e2211ab86e906876faf26f74cbc868dce424d (patch) | |
tree | c5ffb1aa7f7a0574415bea9a06887da2695e74a3 /libs/libpng/patches/010-png-exec.patch | |
parent | dc33ae8027e13eb6ef49405edc8992136ded3d1b (diff) |
libpng: disable building of executables
They are not packaged here. Upstream backport.
Speeds up compilation and avoids a zlib hack.
Refreshed patches.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'libs/libpng/patches/010-png-exec.patch')
-rw-r--r-- | libs/libpng/patches/010-png-exec.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/libs/libpng/patches/010-png-exec.patch b/libs/libpng/patches/010-png-exec.patch new file mode 100644 index 000000000..43bfa0aab --- /dev/null +++ b/libs/libpng/patches/010-png-exec.patch @@ -0,0 +1,38 @@ +From 28c0f8895e4ac270b56b5c7e8089dd2417bc4e3c Mon Sep 17 00:00:00 2001 +From: Alex Gaynor <alex.gaynor@gmail.com> +Date: Sun, 20 May 2018 18:46:32 -0400 +Subject: [PATCH] cmake: Add an option to enable/disable building of + executables + +Add the CMake option PNG_EXECUTABLES (on by default) in order to +allow or disallow the building of non-essential executable programs +associated with libpng. + +Contributed-by: Alex Gaynor <alex.gaynor@gmail.com> +Contributed-by: Cosmin Truta <ctruta@gmail.com> +Signed-off-by: Cosmin Truta <ctruta@gmail.com> +--- + CMakeLists.txt | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,7 +53,8 @@ endif() + # COMMAND LINE OPTIONS + option(PNG_SHARED "Build shared lib" ON) + option(PNG_STATIC "Build static lib" ON) +-option(PNG_TESTS "Build libpng tests" ON) ++option(PNG_EXECUTABLES "Build libpng executables" ON) ++option(PNG_TESTS "Build libpng tests" ON) + + # Many more configuration options could be added here + option(PNG_FRAMEWORK "Build OS X framework" OFF) +@@ -747,7 +748,7 @@ if(PNG_TESTS AND PNG_SHARED) + png_add_test(NAME pngimage-full COMMAND pngimage OPTIONS --exhaustive --list-combos --log FILES ${PNGSUITE_PNGS}) + endif() + +-if(PNG_SHARED) ++if(PNG_SHARED AND PNG_EXECUTABLES) + add_executable(pngfix ${pngfix_sources}) + target_link_libraries(pngfix png) + set(PNG_BIN_TARGETS pngfix) |