<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 16, 2017 at 12:07 PM,  <span dir="ltr"><<a href="mailto:bhavna@multicorewareinc.com" target="_blank">bhavna@multicorewareinc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Bhavna Hariharan <<a href="mailto:bhavna@multicorewareinc.com">bhavna@multicorewareinc.com</a>><br>
# Date 1497347155 -19800<br>
#      Tue Jun 13 15:15:55 2017 +0530<br>
# Node ID 25a7f0f74c9bff70987d3182c0e4c4<wbr>1b65918a92<br>
# Parent  82ba8c85f8e949188907ebc0cdfc31<wbr>53740c61bf<br>
dhdr: add library, deprecate support for gcc versions below 4.8<br></blockquote><div><br></div><div>Both patches pushed to default branch of x265</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
diff -r 82ba8c85f8e9 -r 25a7f0f74c9b source/CMakeLists.txt<br>
--- a/source/CMakeLists.txt     Tue Jun 06 11:13:19 2017 +0530<br>
+++ b/source/CMakeLists.txt     Tue Jun 13 15:15:55 2017 +0530<br>
@@ -188,6 +188,9 @@<br>
     add_definitions(-Wall -Wextra -Wshadow)<br>
     add_definitions(-D__STDC_<wbr>LIMIT_MACROS=1)<br>
     if(ENABLE_DYNAMIC_HDR10)<br>
+        if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8")<br>
+            message(FATAL_ERROR "gcc version above 4.8 required to support hdr10plus")<br>
+        endif()<br>
         add_definitions(-std=gnu++11)<br>
     else()<br>
         add_definitions(-std=gnu++98)<br>
@@ -369,8 +372,8 @@<br>
 endif(HIGH_BIT_DEPTH)<br>
<br>
 if (ENABLE_DYNAMIC_HDR10)<br>
+    include_directories(. dynamicHDR10 "${PROJECT_BINARY_DIR}")<br>
     add_subdirectory(dynamicHDR10)<br>
-    include_directories(<wbr>dynamicHDR10)<br>
     add_definitions(-DENABLE_<wbr>DYNAMIC_HDR10)<br>
 endif(ENABLE_DYNAMIC_HDR10)<br>
 # this option can only be used when linking multiple libx265 libraries<br>
@@ -514,6 +517,8 @@<br>
 source_group(ASM FILES ${ASM_SRCS})<br>
 if(ENABLE_DYNAMIC_HDR10)<br>
     add_library(x265-static STATIC $<TARGET_OBJECTS:encoder> $<TARGET_OBJECTS:common> $<TARGET_OBJECTS:dynamicHDR10> ${ASM_OBJS} ${ASM_SRCS})<br>
+    add_library(hdr10plus-static STATIC $<TARGET_OBJECTS:dynamicHDR10><wbr>)<br>
+    set_target_properties(<wbr>hdr10plus-static PROPERTIES OUTPUT_NAME hdr10plus)<br>
 else()<br>
     add_library(x265-static STATIC $<TARGET_OBJECTS:encoder> $<TARGET_OBJECTS:common> ${ASM_OBJS} ${ASM_SRCS})<br>
 endif()<br>
@@ -526,6 +531,12 @@<br>
 install(TARGETS x265-static<br>
     LIBRARY DESTINATION ${LIB_INSTALL_DIR}<br>
     ARCHIVE DESTINATION ${LIB_INSTALL_DIR})<br>
+<br>
+if(ENABLE_DYNAMIC_HDR10)<br>
+    install(TARGETS hdr10plus-static<br>
+        LIBRARY DESTINATION ${LIB_INSTALL_DIR}<br>
+        ARCHIVE DESTINATION ${LIB_INSTALL_DIR})<br>
+endif()<br>
 install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_<wbr>config.h" DESTINATION include)<br>
<br>
 if(CMAKE_RC_COMPILER)<br>
@@ -549,10 +560,16 @@<br>
 endif()<br>
 option(ENABLE_SHARED "Build shared library" ON)<br>
 if(ENABLE_SHARED)<br>
-<br>
     if(ENABLE_DYNAMIC_HDR10)<br>
         add_library(x265-shared SHARED "${PROJECT_BINARY_DIR}/x265.<wbr>def" ${ASM_OBJS}<br>
                     ${X265_RC_FILE} $<TARGET_OBJECTS:encoder> $<TARGET_OBJECTS:common> $<TARGET_OBJECTS:dynamicHDR10><wbr>)<br>
+        add_library(hdr10plus SHARED $<TARGET_OBJECTS:dynamicHDR10><wbr>)<br>
+<br>
+        if(MSVC)<br>
+            set_target_properties(<wbr>hdr10plus PROPERTIES OUTPUT_NAME libhdr10plus)<br>
+        else()<br>
+            set_target_properties(<wbr>hdr10plus PROPERTIES OUTPUT_NAME hdr10plus)<br>
+        endif()<br>
     else()<br>
         add_library(x265-shared SHARED "${PROJECT_BINARY_DIR}/x265.<wbr>def" ${ASM_OBJS}<br>
                    ${X265_RC_FILE} $<TARGET_OBJECTS:encoder> $<TARGET_OBJECTS:common>)<br>
@@ -587,6 +604,11 @@<br>
                 ARCHIVE DESTINATION ${LIB_INSTALL_DIR}<br>
                 RUNTIME DESTINATION ${BIN_INSTALL_DIR})<br>
     endif()<br>
+    if(ENABLE_DYNAMIC_HDR10)<br>
+        install(TARGETS hdr10plus<br>
+            LIBRARY DESTINATION ${LIB_INSTALL_DIR}<br>
+            ARCHIVE DESTINATION ${LIB_INSTALL_DIR})<br>
+    endif()<br>
     if(LINKER_OPTIONS)<br>
         # set_target_properties can't do list expansion<br>
         string(REPLACE ";" " " LINKER_OPTION_STR "${LINKER_OPTIONS}")<br>
diff -r 82ba8c85f8e9 -r 25a7f0f74c9b source/dynamicHDR10/<wbr>CMakeLists.txt<br>
--- a/source/dynamicHDR10/<wbr>CMakeLists.txt        Tue Jun 06 11:13:19 2017 +0530<br>
+++ b/source/dynamicHDR10/<wbr>CMakeLists.txt        Tue Jun 13 15:15:55 2017 +0530<br>
@@ -10,7 +10,6 @@<br>
     hdr10plus.h<br>
     api.cpp )<br>
<br>
-else()<br>
 cmake_minimum_required (VERSION 2.8.11)<br>
 project(dynamicHDR10)<br>
 include(CheckIncludeFiles)<br>
@@ -150,26 +149,5 @@<br>
<br>
 option(ENABLE_SHARED "Build shared library" OFF)<br>
<br>
-if(ENABLE_SHARED)<br>
-    add_library(dynamicHDR10 SHARED<br>
-        json11/json11.cpp json11/json11.h<br>
-        BasicStructures.h<br>
-        JsonHelper.cpp JsonHelper.h<br>
-        metadataFromJson.cpp metadataFromJson.h<br>
-        SeiMetadataDictionary.cpp SeiMetadataDictionary.h<br>
-        hdr10plus.h api.cpp )<br>
-else()<br>
-    add_library(dynamicHDR10 STATIC<br>
-    json11/json11.cpp json11/json11.h<br>
-    BasicStructures.h<br>
-    JsonHelper.cpp JsonHelper.h<br>
-    metadataFromJson.cpp metadataFromJson.h<br>
-    SeiMetadataDictionary.cpp SeiMetadataDictionary.h<br>
-    hdr10plus.h api.cpp )<br>
-endif()<br>
-<br>
-install (TARGETS dynamicHDR10<br>
-    LIBRARY DESTINATION ${LIB_INSTALL_DIR}<br>
-    ARCHIVE DESTINATION ${LIB_INSTALL_DIR})<br>
 install(FILES hdr10plus.h DESTINATION include)<br>
 endif()<br>
\ No newline at end of file<br>
______________________________<wbr>_________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/<wbr>listinfo/x265-devel</a><br>
</blockquote></div><br></div></div>