mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Updated CMakeLists.txt to add OSX framework, change YES/NO to ON/OFF
for consistency (Alexey Petruchik).
This commit is contained in:
parent
c4c28d7251
commit
1d7f037627
6
ANNOUNCE
6
ANNOUNCE
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.7.0beta56 - March 9, 2015
|
Libpng 1.7.0beta56 - March 11, 2015
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
This is not intended to be a public release. It will be replaced
|
||||||
within a few weeks by a public version or by another test version.
|
within a few weeks by a public version or by another test version.
|
||||||
@ -746,7 +746,9 @@ Version 1.7.0beta55 [March 9, 2015]
|
|||||||
Added more error reporting in png_default_read_data().
|
Added more error reporting in png_default_read_data().
|
||||||
Merged png_free_data() with libpng-1.6.17rc02.
|
Merged png_free_data() with libpng-1.6.17rc02.
|
||||||
|
|
||||||
Version 1.7.0beta56 [March 9, 2015]
|
Version 1.7.0beta56 [March 11, 2015]
|
||||||
|
Updated CMakeLists.txt to add OSX framework, change YES/NO to ON/OFF
|
||||||
|
for consistency (Alexey Petruchik).
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
4
CHANGES
4
CHANGES
@ -5036,7 +5036,9 @@ Version 1.7.0beta55 [March 9, 2015]
|
|||||||
Added more error reporting in png_default_read_data().
|
Added more error reporting in png_default_read_data().
|
||||||
Merged png_free_data() with libpng-1.6.17rc02.
|
Merged png_free_data() with libpng-1.6.17rc02.
|
||||||
|
|
||||||
Version 1.7.0beta56 [March 9, 2015]
|
Version 1.7.0beta56 [March 11, 2015]
|
||||||
|
Updated CMakeLists.txt to add OSX framework, change YES/NO to ON/OFF
|
||||||
|
for consistency (Alexey Petruchik).
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# CMakeLists.txt
|
# CMakeLists.txt
|
||||||
|
|
||||||
# Copyright (C) 2007-2014 Glenn Randers-Pehrson
|
# Copyright (C) 2007-2015 Glenn Randers-Pehrson
|
||||||
|
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
# For conditions of distribution and use, see the disclaimer
|
# For conditions of distribution and use, see the disclaimer
|
||||||
@ -49,12 +49,20 @@ if(DEFINED PNG_STATIC)
|
|||||||
else()
|
else()
|
||||||
option(PNG_STATIC "Build static lib" ON)
|
option(PNG_STATIC "Build static lib" ON)
|
||||||
endif()
|
endif()
|
||||||
|
if(DEFINED PNG_FRAMEWORK)
|
||||||
option(PNG_TESTS "Build libpng tests" YES)
|
option(PNG_FRAMEWORK "Build OS X framework" ${PNG_FRAMEWORK})
|
||||||
|
else()
|
||||||
|
option(PNG_FRAMEWORK "Build OS X framework" OFF)
|
||||||
|
endif()
|
||||||
|
if(DEFINED PNG_TESTS)
|
||||||
|
option(PNG_TESTS "Build libpng tests" ${PNG_TESTS})
|
||||||
|
else()
|
||||||
|
option(PNG_TESTS "Build libpng tests" ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Many more configuration options could be added here
|
# Many more configuration options could be added here
|
||||||
option(PNG_DEBUG "Build with debug output" NO)
|
option(PNG_DEBUG "Build with debug output" OFF)
|
||||||
option(PNGARG "Disable ANSI-C prototypes" NO)
|
option(PNGARG "Disable ANSI-C prototypes" OFF)
|
||||||
|
|
||||||
# SET LIBNAME
|
# SET LIBNAME
|
||||||
set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
||||||
@ -134,7 +142,7 @@ if(PNG_SHARED)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PNG_STATIC)
|
if(PNG_STATIC)
|
||||||
# does not work without changing name
|
# does not work without changing name
|
||||||
set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static)
|
set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static)
|
||||||
add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources})
|
add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources})
|
||||||
list(APPEND PNG_LIB_TARGETS ${PNG_LIB_NAME_STATIC})
|
list(APPEND PNG_LIB_TARGETS ${PNG_LIB_NAME_STATIC})
|
||||||
@ -145,10 +153,27 @@ if(PNG_STATIC)
|
|||||||
target_link_libraries(${PNG_LIB_NAME_STATIC} ${ZLIB_LIBRARY} ${M_LIBRARY})
|
target_link_libraries(${PNG_LIB_NAME_STATIC} ${ZLIB_LIBRARY} ${M_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(PNG_FRAMEWORK)
|
||||||
|
set(PNG_LIB_NAME_FRAMEWORK ${PNG_LIB_NAME}_framework)
|
||||||
|
add_library(${PNG_LIB_NAME_FRAMEWORK} SHARED ${libpng_sources})
|
||||||
|
list(APPEND PNG_LIB_TARGETS ${PNG_LIB_NAME_FRAMEWORK})
|
||||||
|
set_target_properties(${PNG_LIB_NAME_FRAMEWORK} PROPERTIES
|
||||||
|
FRAMEWORK TRUE
|
||||||
|
FRAMEWORK_VERSION ${PNGLIB_VERSION}
|
||||||
|
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${PNGLIB_MAJOR}.${PNGLIB_MINOR}
|
||||||
|
MACOSX_FRAMEWORK_BUNDLE_VERSION ${PNGLIB_VERSION}
|
||||||
|
MACOSX_FRAMEWORK_IDENTIFIER org.libpng.libpng
|
||||||
|
XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
|
||||||
|
PUBLIC_HEADER "${libpng_public_hdrs}"
|
||||||
|
OUTPUT_NAME png)
|
||||||
|
target_link_libraries(${PNG_LIB_NAME_FRAMEWORK} ${ZLIB_LIBRARY} ${M_LIBRARY})
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT PNG_LIB_TARGETS)
|
if(NOT PNG_LIB_TARGETS)
|
||||||
message(SEND_ERROR
|
message(SEND_ERROR
|
||||||
"No library variant selected to build. "
|
"No library variant selected to build. "
|
||||||
"Please enable at least one of the following options: PNG_STATIC, PNG_SHARED")
|
"Please enable at least one of the following options: "
|
||||||
|
" PNG_STATIC, PNG_SHARED, PNG_FRAMEWORK")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PNG_SHARED AND WIN32)
|
if(PNG_SHARED AND WIN32)
|
||||||
@ -284,7 +309,8 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
|
|||||||
${PNG_EXPORT_RULE}
|
${PNG_EXPORT_RULE}
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
|
|
||||||
if(PNG_SHARED)
|
if(PNG_SHARED)
|
||||||
# Create a symlink for libpng.dll.a => libpng17.dll.a on Cygwin
|
# Create a symlink for libpng.dll.a => libpng17.dll.a on Cygwin
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user