summaryrefslogtreecommitdiff
path: root/indra/cmake/PNG.cmake
blob: cf338ebe5e38c39af28f1e9729e70797dcfa0026 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -*- cmake -*-
include(Prebuilt)

if( TARGET libpng::libpng )
  return()
endif()
create_target(libpng::libpng)

set(PNG_FIND_QUIETLY ON)
set(PNG_FIND_REQUIRED ON)

if (USESYSTEMLIBS)
  include(FindPNG)
else (USESYSTEMLIBS)
  use_prebuilt_binary(libpng)
  if (WINDOWS)
    set_target_libraries(libpng::libpng libpng16)
  else()
	set_target_libraries(libpng::libpng png16 )
  endif()
  set_target_include_dirs( libpng::libpng ${LIBS_PREBUILT_DIR}/include/libpng16)
endif (USESYSTEMLIBS)