<div dir="ltr">It seems that the patch wouldn't work either way due to the version header being moved</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 19, 2019 at 1:13 AM Christopher Degawa <<a href="mailto:ccom@randomderp.com" target="_blank">ccom@randomderp.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"># HG changeset patch<br>
# User Christopher Degawa <<a href="mailto:ccom@randomderp.com" target="_blank">ccom@randomderp.com</a>><br>
# Date 1566188835 0<br>
# Mon Aug 19 04:27:15 2019 +0000<br>
# Node ID 6aec140d15c9f00cf07d04b4fa032b084d47fe16<br>
# Parent de920e0a31831f52599f3937c3ee6945e88ed851<br>
SVTHEVC: Update Findsvthevc.cmake with static lib and 1.4.0 support<br>
<br>
Added static lib suffixes, removed hardcoding of version to 1.3.0, and<br>
added some default PATHS for the find library and include path for the headers<br>
to remove reliance on the enviroment variables being set, although it still does accept them<br>
<br>
diff -r de920e0a3183 -r 6aec140d15c9 source/cmake/Findsvthevc.cmake<br>
--- a/source/cmake/Findsvthevc.cmake Tue Jul 23 17:03:51 2019 +0530<br>
+++ b/source/cmake/Findsvthevc.cmake Mon Aug 19 04:27:15 2019 +0000<br>
@@ -9,20 +9,18 @@<br>
<br>
include(FindPackageHandleStandardArgs)<br>
<br>
-if(UNIX)<br>
-SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so")<br>
-else()<br>
-SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")<br>
-endif()<br>
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib;.so;.a;.dll;.lib")<br>
<br>
set(SVT_VERSION_MAJOR_REQUIRED 1)<br>
set(SVT_VERSION_MINOR_REQUIRED 3)<br>
set(SVT_VERSION_PATCHLEVEL_REQUIRED 0)<br>
+set(SVT_VERSION_REQUIRED "${SVT_VERSION_MAJOR_REQUIRED}.${SVT_VERSION_MINOR_REQUIRED}.${SVT_VERSION_PATCHLEVEL_REQUIRED}")<br>
<br>
find_path(SVT_HEVC_INCLUDE_DIR<br>
NAMES EbApi.h EbErrorCodes.h EbTime.h<br>
- HINTS $ENV{SVT_HEVC_INCLUDE_DIR}<br>
- PATHS ENV<br>
+ PATHS /usr/local/include /usr/include $ENV{SystemDrive}/svt-encoders/include<br>
+ HINTS ENV SVT_HEVC_INCLUDE_DIR<br>
+ PATH_SUFFIXES svt-hevc<br>
DOC "SVT-HEVC include directory")<br>
<br>
if(SVT_HEVC_INCLUDE_DIR)<br>
@@ -37,24 +35,24 @@<br>
string(REGEX MATCH "SVT_VERSION_PATCHLEVEL ([0-9]*)" _ ${version})<br>
set(SVT_VERSION_PATCHLEVEL ${CMAKE_MATCH_1})<br>
<br>
-if(NOT ${SVT_VERSION_MAJOR} EQUAL "1" OR NOT ${SVT_VERSION_MINOR} EQUAL "3" OR NOT ${SVT_VERSION_PATCHLEVEL} EQUAL "0")<br>
- message (SEND_ERROR "-- Found SVT-HEVC Lib Version: ${SVT_VERSION_MAJOR}.${SVT_VERSION_MINOR}.${SVT_VERSION_PATCHLEVEL} which doesn't match the required version: ${SVT_VERSION_MAJOR_REQUIRED}.${SVT_VERSION_MINOR_REQUIRED}.${SVT_VERSION_PATCHLEVEL_REQUIRED}; Aborting configure ")<br>
+set(SVT_VERSION "${SVT_VERSION_MAJOR}.${SVT_VERSION_MINOR}.${SVT_VERSION_PATCHLEVEL}")<br>
+<br>
+if(${SVT_VERSION} VERSION_LESS ${SVT_VERSION_REQUIRED})<br>
+ message (SEND_ERROR "-- Found SVT-HEVC Lib Version: ${SVT_VERSION} which doesn't match the required version: ${SVT_VERSION_REQUIRED}; Aborting configure ")<br>
else()<br>
- message(STATUS "-- Found SVT-HEVC Lib Version: ${SVT_VERSION_MAJOR}.${SVT_VERSION_MINOR}.${SVT_VERSION_PATCHLEVEL}")<br>
+ message(STATUS "-- Found SVT-HEVC Lib Version: ${SVT_VERSION}")<br>
endif()<br>
<br>
endif()<br>
<br>
find_library(SVT_HEVC_LIBRARY<br>
-if(UNIX)<br>
NAMES SvtHevcEnc<br>
-else()<br>
- NAMES SvtHevcEnc<br>
-endif()<br>
- HINTS $ENV{SVT_HEVC_LIBRARY_DIR}<br>
- PATHS ENV<br>
+ PATHS /usr/local/lib /usr/lib /usr/lib64 $ENV{SystemDrive}/svt-encoders/lib $ENV{SystemDrive}/svt-encoders/bin<br>
+ HINTS ENV SVT_HEVC_LIBRARY_DIR<br>
DOC "SVT-HEVC library")<br>
<br>
<br>
mark_as_advanced(SVT_HEVC_LIBRARY SVT_HEVC_INCLUDE_DIR SVT_HEVC_LIBRARY_DIR)<br>
-find_package_handle_standard_args(SVTHEVC REQUIRED_VARS SVT_HEVC_LIBRARY SVT_HEVC_INCLUDE_DIR)<br>
+find_package_handle_standard_args(SVTHEVC<br>
+ REQUIRED_VARS SVT_HEVC_LIBRARY SVT_HEVC_INCLUDE_DIR<br>
+ VERSION_VAR ${SVT_VERSION})<br>
</blockquote></div>