[alpha] Updated CMakeLists.txt for consistent indentation and to avoid an

unclosed if-statement warning (Philip Lowman).
This commit is contained in:
Glenn Randers-Pehrson
2010-01-04 06:36:38 -06:00
parent e53371df6e
commit f86e490099
3 changed files with 122 additions and 128 deletions

View File

@@ -24,36 +24,13 @@ Other information:
1.5.0alpha01-README.txt
1.5.0alpha01-LICENSE.txt
Changes since the last public release (1.4.0beta107):
version 1.4.1alpha01 [November 27, 2009]
Based on 1.4.0beta107 (prerelease)
Changes since the last public release (1.4.0):
version 1.4.1alpha02 [December 11, 2009]
Restored premultiplied alpha feature from version 1.4.0beta105.
Added "double gamma" to parameters for png_set_premultiply_alpha().
Added "float postmultiply_gamma" member to the png_struct.
Moved PNG_DIVIDE_BY_255, PNG_8_BIT_PREMULTIPLY(), etc., from
png.h to pngpriv.h
Updated documentation about png_set_premultiply_alpha().
Always expand pixels to 16-bit samples when premultiplying.
In pngconf.h, require PNG_GAMMA_SUPPORTED to be defined when defining
PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
Eliminated PNG_DIVIDE_BY_255 and PNG_8_BIT_PREMULTIPLY macros
leaving only PNG_DIVIDE_BY_65535 and PNG_16_BIT_PREMULTIPLY
because we will always work with 16 bits.
Sync with version 1.4.0beta107:
Updated README
Added "#define PNG_NO_PEDANTIC_WARNINGS" in the libpng source files.
Removed "-DPNG_CONFIGURE_LIBPNG" from the makefiles, projects, and contrib.
Revised scripts/makefile.netbsd, makefile.openbsd, and makefile.sco
to put png.h and pngconf.h in $prefix/include, like the other scripts,
instead of in $prefix/include/libpng. Also revised makefile.sco
to put them in $prefix/include/libpng15 instead of in
$prefix/include/libpng/libpng15.
Relocated png_do_chop() to its original position in pngrtran.c; the
change in version 1.2.41beta08 caused transparency to be handled wrong
in some 16-bit datastreams (Yusaku Sugai).
version 1.5.0alpha01 [January 4, 2010]
Bump version to 1.5.0alpha01
@@ -73,6 +50,8 @@ version 1.5.0alpha01 [January 4, 2010]
Removed the just-added sysroot feature. It is the job of pkg-config,
not foo.pc, to mangle the directory locations when $PKG_CONFIG_SYSROOT_DIR
has been defined.
Updated CMakeLists.txt for consistent indentation and to avoid an
unclosed if-statement warning (Philip Lowman).
Revised Makefile.am and makefile.in to remove references to Y2KINFO,
KNOWNBUG, and libpng.la (Robert Schwebel)

View File

@@ -2456,6 +2456,8 @@ version 1.5.0alpha01 [January 4, 2010]
Removed the just-added sysroot feature. It is the job of pkg-config,
not foo.pc, to mangle the directory locations when $PKG_CONFIG_SYSROOT_DIR
has been defined.
Updated CMakeLists.txt for consistent indentation and to avoid an
unclosed if-statement warning (Philip Lowman).
Revised Makefile.am and makefile.in to remove references to Y2KINFO,
KNOWNBUG, and libpng.la (Robert Schwebel)

View File

@@ -1,14 +1,20 @@
cmake_minimum_required(VERSION 2.4.3)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
if(UNIX AND NOT DEFINED CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of
build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug
Release RelWithDebInfo MinSizeRel.")
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
"Choose the type of build, options are:
None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used)
Debug
Release
RelWithDebInfo
MinSizeRel.")
endif()
project(PNG C)
project(libpng C)
enable_testing()
# Copyright (C) 2007 Glenn Randers-Pehrson
# Copyright (C) 2007-2010 Glenn Randers-Pehrson
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
@@ -20,8 +26,6 @@ set(PNGLIB_RELEASE 0)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
# needed packages
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIR})
@@ -54,9 +58,9 @@ endif()
if(MINGW)
option(PNG_TESTS "Build pngtest" NO)
else(MINGW)
else()
option(PNG_TESTS "Build pngtest" YES)
endif(MINGW)
endif()
option(PNG_NO_CONSOLE_IO "FIXME" YES)
option(PNG_NO_STDIO "FIXME" YES)
@@ -70,7 +74,8 @@ set(png_asm_tmp "OFF")
if(NOT WIN32)
find_program(uname_executable NAMES uname PATHS /bin /usr/bin /usr/local/bin)
if(uname_executable)
EXEC_PROGRAM(${uname_executable} ARGS --machine OUTPUT_VARIABLE uname_output)
exec_program(${uname_executable}
ARGS --machine OUTPUT_VARIABLE uname_output)
if("uname_output" MATCHES "^.*i[1-9]86.*$")
set(png_asm_tmp "ON")
else("uname_output" MATCHES "^.*i[1-9]86.*$")
@@ -79,7 +84,7 @@ if(NOT WIN32)
endif(uname_executable)
else()
# this env var is normally only set on win64
SET(TEXT "ProgramFiles(x86)")
set(TEXT "ProgramFiles(x86)")
if("$ENV{${TEXT}}" STREQUAL "")
set(png_asm_tmp "ON")
endif("$ENV{${TEXT}}" STREQUAL "")
@@ -129,6 +134,7 @@ if(PNG_SHARED OR NOT MSVC)
add_definitions(-DZLIB_DLL)
endif()
if(PNG_CONSOLE_IO_SUPPORTED)
add_definitions(-DPNG_CONSOLE_IO_SUPPORTED)
endif()
@@ -150,7 +156,7 @@ if(NOT M_LIBRARY AND NOT WIN32)
endif()
# NOW BUILD OUR TARGET
include_directories(${PNG_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
if(PNG_SHARED)
add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
@@ -177,10 +183,10 @@ if(PNG_SHARED AND WIN32)
endif()
if(PNG_TESTS AND PNG_SHARED)
# does not work with msvc due to png_lib_ver issue
# does not work with msvc due to png_lib_ver issue
add_executable(pngtest ${pngtest_sources})
target_link_libraries(pngtest ${PNG_LIB_NAME})
add_test(pngtest pngtest ${PNG_SOURCE_DIR}/pngtest.png)
add_test(pngtest pngtest ${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png)
endif()
@@ -191,14 +197,14 @@ set(exec_prefix ${CMAKE_INSTALL_PREFIX})
set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
configure_file(${PNG_SOURCE_DIR}/libpng.pc.in
${PNG_BINARY_DIR}/libpng.pc)
configure_file(${PNG_SOURCE_DIR}/libpng-config.in
${PNG_BINARY_DIR}/libpng-config)
configure_file(${PNG_SOURCE_DIR}/libpng.pc.in
${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc)
configure_file(${PNG_SOURCE_DIR}/libpng-config.in
${PNG_BINARY_DIR}/${PNGLIB_NAME}-config)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
${CMAKE_CURRENT_BINARY_DIR}/libpng.pc)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
${CMAKE_CURRENT_BINARY_DIR}/libpng-config)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config)
# SET UP LINKS
if(PNG_SHARED)
@@ -233,20 +239,27 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
endif()
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
install(FILES png.h pngconf.h pngpriv.h DESTINATION include)
install(FILES png.h pngconf.h pngpriv.h DESTINATION include/${PNGLIB_NAME})
install(FILES png.h pngconf.h DESTINATION include)
install(FILES png.h pngconf.h DESTINATION include/${PNGLIB_NAME})
endif()
if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL )
install(PROGRAMS ${PNG_BINARY_DIR}/libpng-config DESTINATION bin)
install(PROGRAMS ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
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
install(FILES libpng.3 libpngpf.3 DESTINATION man/man3)
install(FILES png.5 DESTINATION man/man5)
install(FILES ${PNG_BINARY_DIR}/libpng.pc DESTINATION lib/pkgconfig)
install(FILES ${PNG_BINARY_DIR}/libpng-config DESTINATION bin)
install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc DESTINATION lib/pkgconfig)
install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
# Install pkg-config files
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc
DESTINATION lib/pkgconfig)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng-config
DESTINATION bin)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
DESTINATION lib/pkgconfig)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
DESTINATION bin)
endif()
# what's with libpng.txt and all the extra files?