summaryrefslogtreecommitdiff
path: root/indra/cmake/JPEG.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake/JPEG.cmake')
-rw-r--r--indra/cmake/JPEG.cmake28
1 files changed, 13 insertions, 15 deletions
diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake
index d6da22aecc..252d7852d4 100644
--- a/indra/cmake/JPEG.cmake
+++ b/indra/cmake/JPEG.cmake
@@ -2,19 +2,17 @@
include(Prebuilt)
include(Linking)
-set(JPEG_FIND_QUIETLY ON)
-set(JPEG_FIND_REQUIRED ON)
-if (USESYSTEMLIBS)
- include(FindJPEG)
-else (USESYSTEMLIBS)
- use_prebuilt_binary(jpeglib)
- if (LINUX)
- set(JPEG_LIBRARIES jpeg)
- elseif (DARWIN)
- set(JPEG_LIBRARIES jpeg)
- elseif (WINDOWS)
- set(JPEG_LIBRARIES jpeglib)
- endif (LINUX)
- set(JPEG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
-endif (USESYSTEMLIBS)
+include_guard()
+add_library( ll::libjpeg INTERFACE IMPORTED )
+
+use_system_binary(libjpeg)
+use_prebuilt_binary(jpeglib)
+if (LINUX)
+ target_link_libraries( ll::libjpeg INTERFACE jpeg)
+elseif (DARWIN)
+ target_link_libraries( ll::libjpeg INTERFACE jpeg)
+elseif (WINDOWS)
+ target_link_libraries( ll::libjpeg INTERFACE jpeglib)
+endif (LINUX)
+target_include_directories( ll::libjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)