Lines Matching +full:cmake +full:- +full:options
4 # Copyright (C) 2007,2009-2018 Glenn Randers-Pehrson
6 # Revised by Roger Lowman, 2009-2010
7 # Revised by Clifford Yapp, 2011-2012,2017
38 # Useful if zlib is being built alongside this as a sub-project.
53 # COMMAND LINE OPTIONS
58 # Many more configuration options could be added here
79 if(index EQUAL -1)
90 add_definitions(-DPNG_ARM_NEON_OPT=2)
92 add_definitions(-DPNG_ARM_NEON_CHECK_SUPPORTED)
95 add_definitions(-DPNG_ARM_NEON_OPT=0)
108 if(index EQUAL -1)
116 add_definitions(-DPNG_POWERPC_VSX_OPT=2)
119 add_definitions(-DPNG_POWERPC_VSX_OPT=0)
132 if(index EQUAL -1)
140 add_definitions(-DPNG_INTEL_SSE_OPT=1)
143 add_definitions(-DPNG_INTEL_SSE_OPT=0)
156 if(index EQUAL -1)
164 add_definitions(-DPNG_MIPS_MSA_OPT=2)
167 add_definitions(-DPNG_MIPS_MSA_OPT=0)
176 add_definitions(-DPNG_ARM_NEON_OPT=0)
182 add_definitions(-DPNG_POWERPC_VSX_OPT=0)
188 add_definitions(-DPNG_INTEL_SSE_OPT=0)
194 add_definitions(-DPNG_MIPS_MSA_OPT=0)
206 option(ld-version-script "Enable linker version script" ON)
207 if(ld-version-script AND NOT APPLE)
220 …set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR…
226 …set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE} "-Wl,-M -Wl,${CMAKE_CURRENT_BINARY_DIR}/conf…
241 execute_process(COMMAND "${CMAKE_C_COMPILER}" "-E" "-"
276 # No awk available to generate sources; use pre-built pnglibconf.h
285 set(options) variable
288 cmake_parse_arguments(_GC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
298 "-DINPUT=${_GC_INPUT}"
299 "-DOUTPUT=${_GC_OUTPUT}"
300 -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/genchk.cmake"
308 set(options) variable
311 cmake_parse_arguments(_GO "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
321 "-DINPUT=${_GO_INPUT}"
322 "-DOUTPUT=${_GO_OUTPUT}"
323 -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/genout.cmake"
331 set(options) variable
334 cmake_parse_arguments(_GSO "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
341 "-DOUTPUT=${_GSO_OUTPUT}"
342 -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake"
350 COMMAND "${CMAKE_COMMAND}" -E remove "${destination}"
351 COMMAND "${CMAKE_COMMAND}" -E copy "${source}"
359 "${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk"
365 "${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk"
419 add_custom_target(symbol-check DEPENDS
432 "-DOUTPUT=scripts/pnglibconf.h.prebuilt"
433 -P "${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake"
438 # confuses parallel make (it would require a separate top-level
513 contrib/tools/png-fix-itxt.c
517 add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
521 add_definitions(-DPNG_DEBUG)
535 # msvc does not append 'lib' - do it here to have consistent name
544 "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/libpng.vers'")
547 "-Wl,-M -Wl,'${CMAKE_CURRENT_BINARY_DIR}/libpng.vers'")
571 # msvc does not append 'lib' - do it here to have consistent name
597 "Please enable at least one of the following options: "
606 set(options) variable
608 set(multiValueArgs OPTIONS FILES)
609 cmake_parse_arguments(_PAT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
621 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scripts/test.cmake.in"
622 "${CMAKE_CURRENT_BINARY_DIR}/tests/${_PAT_NAME}.cmake" @ONLY)
625 "-DLIBPNG=$<TARGET_FILE:png>"
626 "-DTEST_COMMAND=$<TARGET_FILE:${_PAT_COMMAND}>"
627 -P "${CMAKE_CURRENT_BINARY_DIR}/tests/${_PAT_NAME}.cmake")
648 png_add_test(NAME pngvalid-gamma-16-to-8
649 COMMAND pngvalid OPTIONS --gamma-16-to-8)
650 png_add_test(NAME pngvalid-gamma-alpha-mode
651 COMMAND pngvalid OPTIONS --gamma-alpha-mode)
652 png_add_test(NAME pngvalid-gamma-background
653 COMMAND pngvalid OPTIONS --gamma-background)
654 png_add_test(NAME pngvalid-gamma-expand16-alpha-mode
655 COMMAND pngvalid OPTIONS --gamma-alpha-mode --expand16)
656 png_add_test(NAME pngvalid-gamma-expand16-background
657 COMMAND pngvalid OPTIONS --gamma-background --expand16)
658 png_add_test(NAME pngvalid-gamma-expand16-transform
659 COMMAND pngvalid OPTIONS --gamma-transform --expand16)
660 png_add_test(NAME pngvalid-gamma-sbit
661 COMMAND pngvalid OPTIONS --gamma-sbit)
662 png_add_test(NAME pngvalid-gamma-threshold
663 COMMAND pngvalid OPTIONS --gamma-threshold)
664 png_add_test(NAME pngvalid-gamma-transform
665 COMMAND pngvalid OPTIONS --gamma-transform)
666 png_add_test(NAME pngvalid-progressive-interlace-standard
667 COMMAND pngvalid OPTIONS --standard --progressive-read --interlace)
668 png_add_test(NAME pngvalid-progressive-size
669 COMMAND pngvalid OPTIONS --size --progressive-read)
670 png_add_test(NAME pngvalid-progressive-standard
671 COMMAND pngvalid OPTIONS --standard --progressive-read)
672 png_add_test(NAME pngvalid-standard
673 COMMAND pngvalid OPTIONS --standard)
674 png_add_test(NAME pngvalid-transform
675 COMMAND pngvalid OPTIONS --transform)
684 string(REGEX MATCH ".*-linear[-.].*" TEST_PNG_LINEAR "${test_png}")
685 string(REGEX MATCH ".*-sRGB[-.].*" TEST_PNG_SRGB "${test_png}")
686 string(REGEX MATCH ".*-1.8[-.].*" TEST_PNG_G18 "${test_png}")
687 string(REGEX MATCH ".*-alpha-.*" TEST_PNG_ALPHA "${test_png}")
725 png_add_test(NAME pngstest-${gamma_type}-${alpha_type}
727 OPTIONS --tmpfile "${gamma_type}-${alpha_type}-" --log
735 …png_add_test(NAME pngunknown-discard COMMAND pngunknown OPTIONS --strict default=discard FILES "${…
736 …png_add_test(NAME pngunknown-IDAT COMMAND pngunknown OPTIONS --strict default=discard IDAT=save FI…
737 …png_add_test(NAME pngunknown-if-safe COMMAND pngunknown OPTIONS --strict default=if-safe FILES "${…
738 …png_add_test(NAME pngunknown-sAPI COMMAND pngunknown OPTIONS --strict bKGD=save cHRM=save gAMA=sav…
739 …png_add_test(NAME pngunknown-save COMMAND pngunknown OPTIONS --strict default=save FILES "${PNGTES…
740 …png_add_test(NAME pngunknown-sTER COMMAND pngunknown OPTIONS --strict sTER=if-safe FILES "${PNGTES…
741 …png_add_test(NAME pngunknown-vpAg COMMAND pngunknown OPTIONS --strict vpAg=if-safe FILES "${PNGTES…
746 …png_add_test(NAME pngimage-quick COMMAND pngimage OPTIONS --list-combos --log FILES ${PNGSUITE_PNG…
747 …png_add_test(NAME pngimage-full COMMAND pngimage OPTIONS --exhaustive --list-combos --log FILES ${…
755 add_executable(png-fix-itxt ${png_fix_itxt_sources})
756 target_link_libraries(png-fix-itxt ${ZLIB_LIBRARY} ${M_LIBRARY})
757 list(APPEND PNG_BIN_TARGETS png-fix-itxt)
760 # Set a variable with CMake code which:
782 COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${S_FILE} ${DEST_FILE}
786 COMMAND ${CMAKE_COMMAND} -E create_symlink ${S_FILE} ${DEST_FILE}
797 …COMMAND "${CMAKE_COMMAND}" -E copy_if_different $<TARGET_LINKER_FILE_NAME:${S_TARGET}> $<TARGET_LI…
800 …COMMAND "${CMAKE_COMMAND}" -E create_symlink $<TARGET_LINKER_FILE_NAME:${S_TARGET}> $<TARGET_LINKE…
807 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/genchk.cmake.in
808 ${CMAKE_CURRENT_BINARY_DIR}/scripts/genchk.cmake @ONLY)
809 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/genout.cmake.in
810 ${CMAKE_CURRENT_BINARY_DIR}/scripts/genout.cmake @ONLY)
811 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/gensrc.cmake.in
812 ${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake @ONLY)
821 # Only do this on Windows for Cygwin - the files don't make much sense outside
822 # of a UNIX look-alike.
828 set(LIBS "-lz -lm")
833 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
834 ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
835 create_symlink(libpng-config FILE ${PNGLIB_NAME}-config)
886 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin)
887 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
903 # Install pkg-config files
907 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config
911 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
916 # Create an export file that CMake users can include() to import our targets.
918 install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake)
921 # what's with libpng-manual.txt and all the extra files?