blob: 874c8cd352a11f2b226e7602937197cc95649dfa [file] [log] [blame]
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -05001cmake_minimum_required(VERSION 2.4.3)
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -06002set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
3
Glenn Randers-Pehrsonee35abb2009-10-30 15:42:54 -05004if(UNIX AND NOT DEFINED CMAKE_BUILD_TYPE)
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -06005 set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
6 "Choose the type of build, options are:
7 None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used)
8 Debug
9 Release
10 RelWithDebInfo
11 MinSizeRel.")
Glenn Randers-Pehrsonee35abb2009-10-30 15:42:54 -050012endif()
13
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060014project(libpng C)
Glenn Randers-Pehrsonee35abb2009-10-30 15:42:54 -050015enable_testing()
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -060016
Glenn Randers-Pehrsonf81b50b2009-12-29 16:50:15 -060017# Copyright (C) 2007-2010 Glenn Randers-Pehrson
Glenn Randers-Pehrson3e61d792009-06-24 09:31:28 -050018
Glenn Randers-Pehrsonbfbf8652009-06-26 21:46:52 -050019# This code is released under the libpng license.
Glenn Randers-Pehrsonc332bbc2009-06-25 13:43:50 -050020# For conditions of distribution and use, see the disclaimer
Glenn Randers-Pehrson037023b2009-06-24 10:27:36 -050021# and license in png.h
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -060022
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -050023set(PNGLIB_MAJOR 1)
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060024set(PNGLIB_MINOR 5)
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -050025set(PNGLIB_RELEASE 0)
26set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
27set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -060028
29# needed packages
30find_package(ZLIB REQUIRED)
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -050031include_directories(${ZLIB_INCLUDE_DIR})
32
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -050033if(NOT WIN32)
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060034 find_library(M_LIBRARY
35 NAMES m
36 PATHS /usr/lib /usr/local/lib
37 )
38 if(NOT M_LIBRARY)
39 message(STATUS
40 "math library 'libm' not found - floating point support disabled")
41 endif()
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -050042else()
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060043 # not needed on windows
44 set(M_LIBRARY "")
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -050045endif()
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -060046
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -050047# COMMAND LINE OPTIONS
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -050048if(DEFINED PNG_SHARED)
49 option(PNG_SHARED "Build shared lib" ${PNG_SHARED})
50else()
51 option(PNG_SHARED "Build shared lib" ON)
52endif()
53if(DEFINED PNG_STATIC)
54 option(PNG_STATIC "Build static lib" ${PNG_STATIC})
55else()
56 option(PNG_STATIC "Build static lib" ON)
57endif()
58
Glenn Randers-Pehrson glennrp@comcast.net7ecf7bd2009-05-02 15:36:08 -050059if(MINGW)
60 option(PNG_TESTS "Build pngtest" NO)
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060061else()
Glenn Randers-Pehrson glennrp@comcast.net7ecf7bd2009-05-02 15:36:08 -050062 option(PNG_TESTS "Build pngtest" YES)
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060063endif()
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -050064
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -050065option(PNG_NO_CONSOLE_IO "FIXME" YES)
66option(PNG_NO_STDIO "FIXME" YES)
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -050067option(PNG_DEBUG "Build with debug output" NO)
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -050068option(PNGARG "FIXME" YES)
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -060069#TODO:
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -060070# PNG_CONSOLE_IO_SUPPORTED
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -060071
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -050072# maybe needs improving, but currently I don't know when we can enable what :)
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -060073set(png_asm_tmp "OFF")
74if(NOT WIN32)
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060075 find_program(uname_executable NAMES uname PATHS /bin /usr/bin /usr/local/bin)
76 if(uname_executable)
77 exec_program(${uname_executable}
78 ARGS --machine OUTPUT_VARIABLE uname_output)
79 if("uname_output" MATCHES "^.*i[1-9]86.*$")
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -050080 set(png_asm_tmp "ON")
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060081 else("uname_output" MATCHES "^.*i[1-9]86.*$")
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -050082 set(png_asm_tmp "OFF")
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060083 endif("uname_output" MATCHES "^.*i[1-9]86.*$")
84 endif(uname_executable)
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -050085else()
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060086 # this env var is normally only set on win64
87 set(TEXT "ProgramFiles(x86)")
88 if("$ENV{${TEXT}}" STREQUAL "")
89 set(png_asm_tmp "ON")
90 endif("$ENV{${TEXT}}" STREQUAL "")
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -050091endif()
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -060092
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -050093# SET LIBNAME
Glenn Randers-Pehrson8c037302010-08-23 17:07:32 -050094set(PNG_LIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -060095
96# to distinguish between debug and release lib
97set(CMAKE_DEBUG_POSTFIX "d")
98
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -060099
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -0500100# OUR SOURCES
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -0600101set(libpng_sources
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600102 png.h
103 pngconf.h
Glenn Randers-Pehrson8c037302010-08-23 17:07:32 -0500104 pngpriv.h
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600105 png.c
106 pngerror.c
107 pngget.c
108 pngmem.c
109 pngpread.c
110 pngread.c
111 pngrio.c
112 pngrtran.c
113 pngrutil.c
114 pngset.c
115 pngtrans.c
116 pngwio.c
117 pngwrite.c
118 pngwtran.c
119 pngwutil.c
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -0600120)
121set(pngtest_sources
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600122 pngtest.c
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -0600123)
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -0500124# SOME NEEDED DEFINITIONS
Glenn Randers-Pehrson69b0bc02009-11-07 12:02:48 -0600125
Glenn Randers-Pehrson8c037302010-08-23 17:07:32 -0500126add_definitions(-DPNG_CONFIGURE_LIBPNG)
127
128if(_AIX)
129 add_definitions(-D_ALL_SOURCE)
130endif(_AIX)
131
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -0600132if(MSVC)
Glenn Randers-Pehrson8c037302010-08-23 17:07:32 -0500133 add_definitions(-DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE)
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -0600134endif(MSVC)
135
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500136if(PNG_SHARED OR NOT MSVC)
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600137 #if building msvc static this has NOT to be defined
138 add_definitions(-DZLIB_DLL)
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500139endif()
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -0600140
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600141
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -0500142if(PNG_CONSOLE_IO_SUPPORTED)
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600143 add_definitions(-DPNG_CONSOLE_IO_SUPPORTED)
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500144endif()
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -0500145
146if(PNG_NO_CONSOLE_IO)
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600147 add_definitions(-DPNG_NO_CONSOLE_IO)
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500148endif()
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -0500149
150if(PNG_NO_STDIO)
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600151 add_definitions(-DPNG_NO_STDIO)
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500152endif()
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -0500153
154if(PNG_DEBUG)
Glenn Randers-Pehrson8c037302010-08-23 17:07:32 -0500155 add_definitions(-DPNG_DEBUG)
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500156endif()
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -0500157
Glenn Randers-Pehrson glennrp@comcast.net7ecf7bd2009-05-02 15:36:08 -0500158if(NOT M_LIBRARY AND NOT WIN32)
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600159 add_definitions(-DPNG_NO_FLOATING_POINT_SUPPORTED)
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500160endif()
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -0500161
162# NOW BUILD OUR TARGET
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600163include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -0600164
165if(PNG_SHARED)
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600166 add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
167 if(MSVC)
168 # msvc does not append 'lib' - do it here to have consistent name
169 set_target_properties(${PNG_LIB_NAME} PROPERTIES PREFIX "lib")
170 endif()
171 target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY})
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500172endif()
173
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -0500174if(PNG_STATIC)
175# does not work without changing name
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600176 set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static)
177 add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources})
178 if(MSVC)
179 # msvc does not append 'lib' - do it here to have consistent name
180 set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES PREFIX "lib")
181 endif()
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500182endif()
183
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -0600184
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -0600185if(PNG_SHARED AND WIN32)
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600186 set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500187endif()
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -0600188
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500189if(PNG_TESTS AND PNG_SHARED)
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600190 # does not work with msvc due to png_lib_ver issue
191 add_executable(pngtest ${pngtest_sources})
192 target_link_libraries(pngtest ${PNG_LIB_NAME})
193 add_test(pngtest pngtest ${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png)
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500194endif()
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -0600195
196
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -0500197# CREATE PKGCONFIG FILES
198# we use the same files like ./configure, so we have to set its vars
Glenn Randers-Pehrson8c037302010-08-23 17:07:32 -0500199if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
200 set(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib)
201endif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -0500202set(prefix ${CMAKE_INSTALL_PREFIX})
203set(exec_prefix ${CMAKE_INSTALL_PREFIX})
Glenn Randers-Pehrson8c037302010-08-23 17:07:32 -0500204set(libdir ${CMAKE_INSTALL_LIBDIR})
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -0500205set(includedir ${CMAKE_INSTALL_PREFIX}/include)
Glenn Randers-Pehrson8c037302010-08-23 17:07:32 -0500206set(LIBS "-lz -lm")
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -0500207
Glenn Randers-Pehrson8c037302010-08-23 17:07:32 -0500208 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
209 ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)
210install(CODE "
211 MESSAGE(STATUS \"Symlinking ${PNGLIB_NAME}.pc to libpng.pc\")
212 execute_process(COMMAND \${CMAKE_COMMAND} -E create_symlink
213 \"${PNGLIB_NAME}.pc\"
214 \"libpng.pc\")
215")
216 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
217 ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
218install(CODE "
219 MESSAGE(STATUS \"Symlinking ${PNGLIB_NAME}-config to libpng-config\")
220 execute_process(COMMAND \${CMAKE_COMMAND} -E create_symlink
221 \"${PNGLIB_NAME}-config\"
222 \"libpng-config\")
223")
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -0500224
225# SET UP LINKS
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500226if(PNG_SHARED)
227 set_target_properties(${PNG_LIB_NAME} PROPERTIES
Glenn Randers-Pehrson8c037302010-08-23 17:07:32 -0500228# VERSION 15.${PNGLIB_RELEASE}.1.5.0beta44
Glenn Randers-Pehrsonf1eb9182010-02-08 15:36:41 -0600229 VERSION 15.${PNGLIB_RELEASE}.0
230 SOVERSION 15
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600231 CLEAN_DIRECT_OUTPUT 1)
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500232endif()
Glenn Randers-Pehrson glennrp@comcast.net7ecf7bd2009-05-02 15:36:08 -0500233if(PNG_STATIC)
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500234 if(NOT WIN32)
235 # that's uncool on win32 - it overwrites our static import lib...
236 set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600237 OUTPUT_NAME ${PNG_LIB_NAME}
238 CLEAN_DIRECT_OUTPUT 1)
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500239 endif()
240endif()
241
242# INSTALL
243if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600244 if(PNG_SHARED)
245 install(TARGETS ${PNG_LIB_NAME}
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500246 RUNTIME DESTINATION bin
Glenn Randers-Pehrson8c037302010-08-23 17:07:32 -0500247 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
248 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
249 install(CODE "
250 MESSAGE(STATUS \"Symlinking ${PNGLIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} to libpng${CMAKE_SHARED_LIBRARY_SUFFIX}\")
251 execute_process(COMMAND \${CMAKE_COMMAND} -E create_symlink
252 \"${PNGLIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}\"
253 \"libpng${CMAKE_SHARED_LIBRARY_SUFFIX}\")
254 ")
255 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX} DESTINATION ${CMAKE_INSTALL_LIBDIR})
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600256 endif()
257 if(PNG_STATIC)
258 install(TARGETS ${PNG_LIB_NAME_STATIC}
Glenn Randers-Pehrson8c037302010-08-23 17:07:32 -0500259 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
260 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
261 install(CODE "
262 MESSAGE(STATUS \"Symlinking ${PNGLIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX} to libpng${CMAKE_STATIC_LIBRARY_SUFFIX}\")
263 execute_process(COMMAND \${CMAKE_COMMAND} -E create_symlink
264 \"${PNGLIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}\"
265 \"libpng${CMAKE_STATIC_LIBRARY_SUFFIX}\")
266 ")
267 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX} DESTINATION ${CMAKE_INSTALL_LIBDIR})
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600268 endif()
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500269endif()
270
271if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600272 install(FILES png.h pngconf.h DESTINATION include)
273 install(FILES png.h pngconf.h DESTINATION include/${PNGLIB_NAME})
Glenn Randers-Pehrsonee35abb2009-10-30 15:42:54 -0500274endif()
275if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL )
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600276 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin)
277 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
278 DESTINATION bin)
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500279endif()
280if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600281 # Install man pages
Glenn Randers-Pehrson8c037302010-08-23 17:07:32 -0500282 install(FILES libpng.3 libpngpf.3 DESTINATION share/man/man3)
283 install(FILES png.5 DESTINATION share/man/man5)
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600284 # Install pkg-config files
285 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc
Glenn Randers-Pehrson8c037302010-08-23 17:07:32 -0500286 DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
287 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600288 DESTINATION bin)
289 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
Glenn Randers-Pehrson8c037302010-08-23 17:07:32 -0500290 DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
291 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600292 DESTINATION bin)
Glenn Randers-Pehrson38e467e2009-08-27 15:59:40 -0500293endif()
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -0500294
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -0600295# what's with libpng.txt and all the extra files?
296
297
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -0500298# UNINSTALL
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -0600299# do we need this?
300
301
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -0500302# DIST
Glenn Randers-Pehrson7edd4582006-12-07 19:16:44 -0600303# do we need this?
304
305# to create msvc import lib for mingw compiled shared lib
306# pexports libpng.dll > libpng.def
307# lib /def:libpng.def /machine:x86
Glenn Randers-Pehrson glennrp@comcast.net7ecf7bd2009-05-02 15:36:08 -0500308