From 2d7dd844219965b81e81848e60d7f7bf23035ee4 Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 9 Feb 2022 22:15:14 +0100 Subject: Removed install-time rules from third-party libraries Removing and starting anew is one way. The other way would be to move the third-party libraries out of the tree and just install them properly, but I'm unsure how well it will go for Windows hosts, so I'm choosing the self-contained route. --- libpng/CMakeLists.txt | 97 --------------------------------------------------- 1 file changed, 97 deletions(-) (limited to 'libpng') diff --git a/libpng/CMakeLists.txt b/libpng/CMakeLists.txt index 69b724c..36a55dc 100644 --- a/libpng/CMakeLists.txt +++ b/libpng/CMakeLists.txt @@ -252,14 +252,12 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in _png_generate_symlink_code(PNG_PC_INSTALL_CODE ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc) -install(CODE ${PNG_PC_INSTALL_CODE}) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY) _png_generate_symlink_code(PNG_CONFIG_INSTALL_CODE ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config ${CMAKE_CURRENT_BINARY_DIR}/libpng-config) -install(CODE ${PNG_CONFIG_INSTALL_CODE}) # SET UP LINKS if(PNG_SHARED) @@ -289,101 +287,6 @@ elseif(CMAKE_MAJOR_VERSION GREATER 2) # future proof set(PNG_EXPORT_RULE EXPORT libpng) endif() -# INSTALL -if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) - if(PNG_SHARED) - install(TARGETS ${PNG_LIB_NAME} - ${PNG_EXPORT_RULE} - RUNTIME DESTINATION bin - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - - # Create a symlink for libpng.dll.a => libpng15.dll.a on Cygwin - if(CYGWIN) - _png_generate_symlink_code(PNG_SHARED_IMPLIB_INSTALL_CODE - ${PNGLIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX} - libpng${CMAKE_IMPORT_LIBRARY_SUFFIX}) - install(CODE ${PNG_SHARED_IMPLIB_INSTALL_CODE}) - install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} - DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - - if(NOT WIN32) - IF(CMAKE_LIBRARY_OUTPUT_DIRECTORY) - _png_generate_symlink_code(PNG_SHARED_INSTALL_CODE - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${PNGLIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}) - install(CODE ${PNG_SHARED_INSTALL_CODE}) - install(FILES - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX} - DESTINATION ${CMAKE_INSTALL_LIBDIR}) - ELSE(CMAKE_LIBRARY_OUTPUT_DIRECTORY) - _png_generate_symlink_code(PNG_SHARED_INSTALL_CODE - ${PNGLIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} - libpng${CMAKE_SHARED_LIBRARY_SUFFIX}) - install(CODE ${PNG_SHARED_INSTALL_CODE}) - install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX} - DESTINATION ${CMAKE_INSTALL_LIBDIR}) - ENDIF(CMAKE_LIBRARY_OUTPUT_DIRECTORY) - endif() - endif() - - if(PNG_STATIC) - install(TARGETS ${PNG_LIB_NAME_STATIC} - ${PNG_EXPORT_RULE} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - if(NOT WIN32 OR CYGWIN) - IF(CMAKE_ARCHIVE_OUTPUT_DIRECTORY) - _png_generate_symlink_code(PNG_STATIC_INSTALL_CODE -${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${PNGLIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX} - ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}) - install(CODE ${PNG_STATIC_INSTALL_CODE}) - install(FILES - ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX} - DESTINATION ${CMAKE_INSTALL_LIBDIR}) - ELSE(CMAKE_ARCHIVE_OUTPUT_DIRECTORY) - _png_generate_symlink_code(PNG_STATIC_INSTALL_CODE - ${PNGLIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX} - libpng${CMAKE_STATIC_LIBRARY_SUFFIX}) - install(CODE ${PNG_STATIC_INSTALL_CODE}) - install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX} - DESTINATION ${CMAKE_INSTALL_LIBDIR}) - ENDIF(CMAKE_ARCHIVE_OUTPUT_DIRECTORY) - endif() - endif() -endif() - -if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL ) - install(FILES ${libpng_public_hdrs} DESTINATION include) - install(FILES ${libpng_public_hdrs} DESTINATION include/${PNGLIB_NAME}) -endif() -if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL ) - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin) - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config - DESTINATION bin) -endif() -if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL ) - # Install man pages - if(NOT PNG_MAN_DIR) - set(PNG_MAN_DIR "share/man") - endif() - install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3) - install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5) - # Install pkg-config files - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config - DESTINATION bin) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config - DESTINATION bin) -endif() - # what's with libpng-$VER%.txt and all the extra files? -- cgit v1.1