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

include(Linking)

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

if (USESYSTEMLIBS)
  include(FindJPEG)
else (USESYSTEMLIBS)
  use_prebuilt_binary(jpeglib)
  if (LINUX)
    set_target_libraries( jpeglib::jpeglib jpeg)
  elseif (DARWIN)
    set_target_libraries( jpeglib::jpeglib jpeg)
  elseif (WINDOWS)
    set_target_libraries( jpeglib::jpeglib jpeglib)
  endif (LINUX)
  set_target_include_dirs( jpeglib::jpeglib ${LIBS_PREBUILT_DIR}/include)
endif (USESYSTEMLIBS)