mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
Use find_package(JPEG) in place of include(FindJPEG)
The former allows the package to be overridden with a local build by `FetchContent`. Also includes the fix to _MSC_VER conditions from: https://aomedia.googlesource.com/aom/+/refs/heads/main/third_party/libyuv/README.libaom Change-Id: I666e591becb3efaa7b5b68d27476319a2909b88e Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3933570 Reviewed-by: Wan-Teh Chang <wtc@google.com>
This commit is contained in:
parent
4b93eb90ba
commit
c365da9c6c
@ -42,7 +42,7 @@ ADD_EXECUTABLE ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc )
|
|||||||
TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} )
|
TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} )
|
||||||
|
|
||||||
|
|
||||||
INCLUDE ( FindJPEG )
|
find_package ( JPEG )
|
||||||
if (JPEG_FOUND)
|
if (JPEG_FOUND)
|
||||||
include_directories( ${JPEG_INCLUDE_DIR} )
|
include_directories( ${JPEG_INCLUDE_DIR} )
|
||||||
target_link_libraries( yuvconvert ${JPEG_LIBRARY} )
|
target_link_libraries( yuvconvert ${JPEG_LIBRARY} )
|
||||||
|
|||||||
@ -108,7 +108,7 @@ void CpuId(int eax, int ecx, int* cpu_info) {
|
|||||||
// }
|
// }
|
||||||
// For VS2013 and earlier 32 bit, the _xgetbv(0) optimizer produces bad code.
|
// For VS2013 and earlier 32 bit, the _xgetbv(0) optimizer produces bad code.
|
||||||
// https://code.google.com/p/libyuv/issues/detail?id=529
|
// https://code.google.com/p/libyuv/issues/detail?id=529
|
||||||
#if defined(_M_IX86) && (_MSC_VER < 1900)
|
#if defined(_M_IX86) && defined(_MSC_VER) && (_MSC_VER < 1900)
|
||||||
#pragma optimize("g", off)
|
#pragma optimize("g", off)
|
||||||
#endif
|
#endif
|
||||||
#if (defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || \
|
#if (defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || \
|
||||||
@ -129,7 +129,7 @@ static int GetXCR0() {
|
|||||||
#define GetXCR0() 0
|
#define GetXCR0() 0
|
||||||
#endif // defined(_M_IX86) || defined(_M_X64) ..
|
#endif // defined(_M_IX86) || defined(_M_X64) ..
|
||||||
// Return optimization to previous setting.
|
// Return optimization to previous setting.
|
||||||
#if defined(_M_IX86) && (_MSC_VER < 1900)
|
#if defined(_M_IX86) && defined(_MSC_VER) && (_MSC_VER < 1900)
|
||||||
#pragma optimize("g", on)
|
#pragma optimize("g", on)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user