summaryrefslogtreecommitdiff
path: root/indra/cmake/JPEG.cmake
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-04-07 00:20:59 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-04-07 00:20:59 +0300
commitf1095d78315818642e62b7f4af9984557e176b5d (patch)
tree3606970e28e1101befbc7b42ccd6033cfd839e7b /indra/cmake/JPEG.cmake
parent4042ed9701fcfa42c03fc285a757aa348f800e33 (diff)
parentc7053a6928fd5eafdc935453742e92951ae4e0c1 (diff)
Merge branch 'main' into marchcat/main-contrib-merge
# Conflicts: # indra/cmake/CMakeLists.txt # indra/llcommon/llsdserialize.cpp # indra/llcommon/llsdserialize.h # indra/llcommon/tests/llleap_test.cpp # indra/newview/llfilepicker.h # indra/newview/llfilepicker_mac.h # indra/newview/llfilepicker_mac.mm # indra/newview/skins/default/xui/en/strings.xml
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)