[devel] Updated CMakeLists.txt (Clifford Yapp)

This commit is contained in:
Glenn Randers-Pehrson 2011-01-14 17:08:28 -06:00
parent e15a96b333
commit d3edb3f27c
3 changed files with 45 additions and 20 deletions

View File

@ -37,6 +37,7 @@ version 1.5.1beta01 [January 8, 2011]
Version 1.5.1beta02 [January 14, 2011] Version 1.5.1beta02 [January 14, 2011]
Fixed a bug in handling of interlaced images (bero at arklinux.org). Fixed a bug in handling of interlaced images (bero at arklinux.org).
Updated CMakeLists.txt (Clifford Yapp)
Send comments/corrections/commendations to png-mng-implement at lists.sf.net: Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
(subscription required; visit (subscription required; visit

View File

@ -3153,6 +3153,7 @@ version 1.5.1beta01 [January 8, 2011]
Version 1.5.1beta02 [January 14, 2011] Version 1.5.1beta02 [January 14, 2011]
Fixed a bug in handling of interlaced images (bero at arklinux.org). Fixed a bug in handling of interlaced images (bero at arklinux.org).
Updated CMakeLists.txt (Clifford Yapp)
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -240,22 +240,25 @@ endmacro()
# CREATE PKGCONFIG FILES # CREATE PKGCONFIG FILES
# we use the same files like ./configure, so we have to set its vars # we use the same files like ./configure, so we have to set its vars
if(NOT DEFINED CMAKE_INSTALL_LIBDIR) if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib) set(CMAKE_INSTALL_LIBDIR lib)
endif(NOT DEFINED CMAKE_INSTALL_LIBDIR) endif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(prefix ${CMAKE_INSTALL_PREFIX}) set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX}) set(exec_prefix ${CMAKE_INSTALL_PREFIX})
set(libdir ${CMAKE_INSTALL_LIBDIR}) set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
set(includedir ${CMAKE_INSTALL_PREFIX}/include) set(includedir ${CMAKE_INSTALL_PREFIX}/include)
set(LIBS "-lz -lm") set(LIBS "-lz -lm")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)
_png_generate_symlink_code(PNG_PC_INSTALL_CODE ${PNGLIB_NAME}.pc libpng.pc) _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}) install(CODE ${PNG_PC_INSTALL_CODE})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
_png_generate_symlink_code(PNG_CONFIG_INSTALL_CODE ${PNGLIB_NAME}-config _png_generate_symlink_code(PNG_CONFIG_INSTALL_CODE
libpng-config) ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
${CMAKE_CURRENT_BINARY_DIR}/libpng-config)
install(CODE ${PNG_CONFIG_INSTALL_CODE}) install(CODE ${PNG_CONFIG_INSTALL_CODE})
# SET UP LINKS # SET UP LINKS
@ -307,6 +310,15 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
endif() endif()
if(NOT WIN32) 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 _png_generate_symlink_code(PNG_SHARED_INSTALL_CODE
${PNGLIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ${PNGLIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
libpng${CMAKE_SHARED_LIBRARY_SUFFIX}) libpng${CMAKE_SHARED_LIBRARY_SUFFIX})
@ -314,6 +326,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
install(FILES install(FILES
${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
DESTINATION ${CMAKE_INSTALL_LIBDIR}) DESTINATION ${CMAKE_INSTALL_LIBDIR})
ENDIF(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
endif() endif()
endif() endif()
@ -323,6 +336,15 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(NOT WIN32 OR CYGWIN) 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 _png_generate_symlink_code(PNG_STATIC_INSTALL_CODE
${PNGLIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX} ${PNGLIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
libpng${CMAKE_STATIC_LIBRARY_SUFFIX}) libpng${CMAKE_STATIC_LIBRARY_SUFFIX})
@ -330,6 +352,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
install(FILES install(FILES
${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX} ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
DESTINATION ${CMAKE_INSTALL_LIBDIR}) DESTINATION ${CMAKE_INSTALL_LIBDIR})
ENDIF(CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
endif() endif()
endif() endif()
endif() endif()
@ -367,7 +390,7 @@ if(PNG_EXPORT_RULE AND NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL )
install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake) install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake)
endif() endif()
# what's with libpng-manual.txt and all the extra files? # what's with libpng-$VER%.txt and all the extra files?
# UNINSTALL # UNINSTALL