File: PNGConfig.cmake

package info (click to toggle)
libpng1.6 1.6.55-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,208 kB
  • sloc: ansic: 58,258; sh: 6,981; awk: 794; cpp: 684; makefile: 617; python: 391; asm: 22
file content (28 lines) | stat: -rw-r--r-- 833 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# PNGConfig.cmake
# CMake config file compatible with the FindPNG module.

# Copyright (c) 2024 Cosmin Truta
# Written by Benjamin Buch, 2024
#
# Use, modification and distribution are subject to
# the same licensing terms and conditions as libpng.
# Please see the copyright notice in png.h or visit
# http://libpng.org/pub/png/src/libpng-LICENSE.txt
#
# SPDX-License-Identifier: libpng-2.0

include(CMakeFindDependencyMacro)

find_dependency(ZLIB REQUIRED)

include("${CMAKE_CURRENT_LIST_DIR}/PNGTargets.cmake")

if(NOT TARGET PNG::PNG)
  if(TARGET PNG::png_shared)
    add_library(PNG::PNG INTERFACE IMPORTED)
    target_link_libraries(PNG::PNG INTERFACE PNG::png_shared)
  elseif(TARGET PNG::png_static)
    add_library(PNG::PNG INTERFACE IMPORTED)
    target_link_libraries(PNG::PNG INTERFACE PNG::png_static)
  endif()
endif()