[master] Moved CMakeLists.txt from scripts

into the main libpng directory.  More bugfixes and improvements to
CMakeLists.txt (Philip Lowman)
This commit is contained in:
Glenn Randers-Pehrson 2009-10-31 12:50:05 -05:00
parent 948c6ee88d
commit 6611322a8b
3 changed files with 19 additions and 4 deletions

View File

@ -86,6 +86,8 @@ version 1.2.41beta08 [October 30, 2009]
version 1.2.41beta09 [October 31, 2009] version 1.2.41beta09 [October 31, 2009]
Removed a harmless extra png_set_invert_alpha() from pngwrite.c Removed a harmless extra png_set_invert_alpha() from pngwrite.c
More bugfixes and improvements to CMakeLists.txt (Philip Lowman)
Moved CMakeLists.txt from scripts into the main libpng directory.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net

View File

@ -2516,6 +2516,8 @@ version 1.2.41beta08 [October 30, 2009]
version 1.2.41beta09 [October 31, 2009] version 1.2.41beta09 [October 31, 2009]
Removed a harmless extra png_set_invert_alpha() from pngwrite.c Removed a harmless extra png_set_invert_alpha() from pngwrite.c
More bugfixes and improvements to CMakeLists.txt (Philip Lowman)
Moved CMakeLists.txt from scripts into the main libpng directory.
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

@ -1,5 +1,12 @@
project(PNG C)
cmake_minimum_required(VERSION 2.4.3) cmake_minimum_required(VERSION 2.4.3)
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.")
endif()
project(PNG C)
enable_testing()
# Copyright (C) 2007 Glenn Randers-Pehrson # Copyright (C) 2007 Glenn Randers-Pehrson
@ -172,7 +179,7 @@ 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}) add_executable(pngtest ${pngtest_sources})
target_link_libraries(pngtest ${PNG_LIB_NAME}) target_link_libraries(pngtest ${PNG_LIB_NAME})
# add_test(pngtest ${PNG_SOURCE_DIR}/pngtest.png) add_test(pngtest pngtest ${PNG_SOURCE_DIR}/pngtest.png)
endif() endif()
@ -228,6 +235,10 @@ if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
install(FILES png.h pngconf.h DESTINATION include) install(FILES png.h pngconf.h DESTINATION include)
install(FILES png.h pngconf.h DESTINATION include/${PNGLIB_NAME}) install(FILES png.h pngconf.h DESTINATION include/${PNGLIB_NAME})
endif() 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)
endif()
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL ) if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
install(FILES libpng.3 libpngpf.3 DESTINATION man/man3) install(FILES libpng.3 libpngpf.3 DESTINATION man/man3)
install(FILES png.5 DESTINATION man/man5) install(FILES png.5 DESTINATION man/man5)