X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9c0d9ce3285864062f74951871971fec1debeafb..c017416682938c39547836051c0fad74db45e8a0:/src/png/CMakeLists.txt?ds=sidebyside diff --git a/src/png/CMakeLists.txt b/src/png/CMakeLists.txt index a3b5a315fc..87cb16de14 100644 --- a/src/png/CMakeLists.txt +++ b/src/png/CMakeLists.txt @@ -35,7 +35,7 @@ enable_testing() set(PNGLIB_MAJOR 1) set(PNGLIB_MINOR 5) -set(PNGLIB_RELEASE 6) +set(PNGLIB_RELEASE 7) set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR}) set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE}) @@ -121,7 +121,7 @@ set(pngtest_sources pngtest.c ) set(pngvalid_sources - pngvalid.c + contrib/libtests/pngvalid.c ) # SOME NEEDED DEFINITIONS @@ -188,7 +188,7 @@ ENDIF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY) # copies if different. macro(CREATE_SYMLINK SRC_FILE DEST_FILE) FILE(REMOVE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE}) - if(WIN32 AND NOT CYGWIN) + if(WIN32 AND NOT CYGWIN AND NOT MINGW) ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${DEST_FILE} COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${SRC_FILE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} @@ -196,10 +196,10 @@ macro(CREATE_SYMLINK SRC_FILE DEST_FILE) DEPENDS ${PNG_LIB_NAME} ${PNG_LIB_NAME_STATIC} ) ADD_CUSTOM_TARGET(${DEST_FILE}_COPY ALL DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE}) - else(WIN32 AND NOT CYGWIN) + else(WIN32 AND NOT CYGWIN AND NOT MINGW) execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SRC_FILE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SRC_FILE} ${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - endif(WIN32 AND NOT CYGWIN) + endif(WIN32 AND NOT CYGWIN AND NOT MINGW) endmacro() # libpng is a library so default to 'lib' @@ -211,7 +211,7 @@ endif(NOT DEFINED CMAKE_INSTALL_LIBDIR) # we use the same files like ./configure, so we have to set its vars # Only do this on Windows for Cygwin - the files don't make much sense outside # a UNIX look alike -if(NOT WIN32 OR CYGWIN) +if(NOT WIN32 OR CYGWIN OR MINGW) set(prefix ${CMAKE_INSTALL_PREFIX}) set(exec_prefix ${CMAKE_INSTALL_PREFIX}) set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) @@ -224,12 +224,12 @@ CREATE_SYMLINK(${PNGLIB_NAME}.pc libpng.pc) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY) CREATE_SYMLINK(${PNGLIB_NAME}-config libpng-config) -endif(NOT WIN32 OR CYGWIN) +endif(NOT WIN32 OR CYGWIN OR MINGW) # SET UP LINKS if(PNG_SHARED) set_target_properties(${PNG_LIB_NAME} PROPERTIES -# VERSION 15.${PNGLIB_RELEASE}.1.5.6 +# VERSION 15.${PNGLIB_RELEASE}.1.5.7 VERSION 15.${PNGLIB_RELEASE}.0 SOVERSION 15 CLEAN_DIRECT_OUTPUT 1) @@ -264,13 +264,13 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) # Create a symlink for libpng.dll.a => libpng15.dll.a on Cygwin - if(CYGWIN) + if(CYGWIN OR MINGW) get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME} LOCATION_${CMAKE_BUILD_TYPE}) get_filename_component(BUILD_TARGET_FILE ${BUILD_TARGET_LOCATION} NAME) CREATE_SYMLINK(${BUILD_TARGET_FILE} libpng${CMAKE_IMPORT_LIBRARY_SUFFIX}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif(CYGWIN) + endif(CYGWIN OR MINGW) if(NOT WIN32) get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME} LOCATION_${CMAKE_BUILD_TYPE}) @@ -286,13 +286,13 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) ${PNG_EXPORT_RULE} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - if(NOT WIN32 OR CYGWIN) + if(NOT WIN32 OR CYGWIN OR MINGW) get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME_STATIC} LOCATION_${CMAKE_BUILD_TYPE}) get_filename_component(BUILD_TARGET_FILE ${BUILD_TARGET_LOCATION} NAME) CREATE_SYMLINK(${BUILD_TARGET_FILE} libpng${CMAKE_STATIC_LIBRARY_SUFFIX}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX} DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif(NOT WIN32 OR CYGWIN) + endif(NOT WIN32 OR CYGWIN OR MINGW) endif() endif()