diff options
Diffstat (limited to 'indra/cmake/JPEG.cmake')
-rw-r--r-- | indra/cmake/JPEG.cmake | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake index d6da22aecc..7245ca7b36 100644 --- a/indra/cmake/JPEG.cmake +++ b/indra/cmake/JPEG.cmake @@ -2,19 +2,22 @@ include(Prebuilt) include(Linking) -set(JPEG_FIND_QUIETLY ON) -set(JPEG_FIND_REQUIRED ON) + +if( TARGET jpeglib::jpeglib ) + return() +endif() +create_target(jpeglib::jpeglib) if (USESYSTEMLIBS) include(FindJPEG) else (USESYSTEMLIBS) use_prebuilt_binary(jpeglib) if (LINUX) - set(JPEG_LIBRARIES jpeg) + set_target_libraries( jpeglib::jpeglib jpeg) elseif (DARWIN) - set(JPEG_LIBRARIES jpeg) + set_target_libraries( jpeglib::jpeglib jpeg) elseif (WINDOWS) - set(JPEG_LIBRARIES jpeglib) + set_target_libraries( jpeglib::jpeglib jpeglib) endif (LINUX) - set(JPEG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) + set_target_include_dirs( jpeglib::jpeglib ${LIBS_PREBUILT_DIR}/include) endif (USESYSTEMLIBS) |