[x265] [PATCH 1 of 2] dhdr: add library, deprecate support for gcc versions below 4.8
Pradeep Ramachandran
pradeep at multicorewareinc.com
Mon Jun 19 11:54:42 CEST 2017
On Fri, Jun 16, 2017 at 12:07 PM, <bhavna at multicorewareinc.com> wrote:
> # HG changeset patch
> # User Bhavna Hariharan <bhavna at multicorewareinc.com>
> # Date 1497347155 -19800
> # Tue Jun 13 15:15:55 2017 +0530
> # Node ID 25a7f0f74c9bff70987d3182c0e4c41b65918a92
> # Parent 82ba8c85f8e949188907ebc0cdfc3153740c61bf
> dhdr: add library, deprecate support for gcc versions below 4.8
>
Both patches pushed to default branch of x265
>
> diff -r 82ba8c85f8e9 -r 25a7f0f74c9b source/CMakeLists.txt
> --- a/source/CMakeLists.txt Tue Jun 06 11:13:19 2017 +0530
> +++ b/source/CMakeLists.txt Tue Jun 13 15:15:55 2017 +0530
> @@ -188,6 +188,9 @@
> add_definitions(-Wall -Wextra -Wshadow)
> add_definitions(-D__STDC_LIMIT_MACROS=1)
> if(ENABLE_DYNAMIC_HDR10)
> + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8")
> + message(FATAL_ERROR "gcc version above 4.8 required to
> support hdr10plus")
> + endif()
> add_definitions(-std=gnu++11)
> else()
> add_definitions(-std=gnu++98)
> @@ -369,8 +372,8 @@
> endif(HIGH_BIT_DEPTH)
>
> if (ENABLE_DYNAMIC_HDR10)
> + include_directories(. dynamicHDR10 "${PROJECT_BINARY_DIR}")
> add_subdirectory(dynamicHDR10)
> - include_directories(dynamicHDR10)
> add_definitions(-DENABLE_DYNAMIC_HDR10)
> endif(ENABLE_DYNAMIC_HDR10)
> # this option can only be used when linking multiple libx265 libraries
> @@ -514,6 +517,8 @@
> source_group(ASM FILES ${ASM_SRCS})
> if(ENABLE_DYNAMIC_HDR10)
> add_library(x265-static STATIC $<TARGET_OBJECTS:encoder>
> $<TARGET_OBJECTS:common> $<TARGET_OBJECTS:dynamicHDR10> ${ASM_OBJS}
> ${ASM_SRCS})
> + add_library(hdr10plus-static STATIC $<TARGET_OBJECTS:dynamicHDR10>)
> + set_target_properties(hdr10plus-static PROPERTIES OUTPUT_NAME
> hdr10plus)
> else()
> add_library(x265-static STATIC $<TARGET_OBJECTS:encoder>
> $<TARGET_OBJECTS:common> ${ASM_OBJS} ${ASM_SRCS})
> endif()
> @@ -526,6 +531,12 @@
> install(TARGETS x265-static
> LIBRARY DESTINATION ${LIB_INSTALL_DIR}
> ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
> +
> +if(ENABLE_DYNAMIC_HDR10)
> + install(TARGETS hdr10plus-static
> + LIBRARY DESTINATION ${LIB_INSTALL_DIR}
> + ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
> +endif()
> install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION
> include)
>
> if(CMAKE_RC_COMPILER)
> @@ -549,10 +560,16 @@
> endif()
> option(ENABLE_SHARED "Build shared library" ON)
> if(ENABLE_SHARED)
> -
> if(ENABLE_DYNAMIC_HDR10)
> add_library(x265-shared SHARED "${PROJECT_BINARY_DIR}/x265.def"
> ${ASM_OBJS}
> ${X265_RC_FILE} $<TARGET_OBJECTS:encoder>
> $<TARGET_OBJECTS:common> $<TARGET_OBJECTS:dynamicHDR10>)
> + add_library(hdr10plus SHARED $<TARGET_OBJECTS:dynamicHDR10>)
> +
> + if(MSVC)
> + set_target_properties(hdr10plus PROPERTIES OUTPUT_NAME
> libhdr10plus)
> + else()
> + set_target_properties(hdr10plus PROPERTIES OUTPUT_NAME
> hdr10plus)
> + endif()
> else()
> add_library(x265-shared SHARED "${PROJECT_BINARY_DIR}/x265.def"
> ${ASM_OBJS}
> ${X265_RC_FILE} $<TARGET_OBJECTS:encoder>
> $<TARGET_OBJECTS:common>)
> @@ -587,6 +604,11 @@
> ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
> RUNTIME DESTINATION ${BIN_INSTALL_DIR})
> endif()
> + if(ENABLE_DYNAMIC_HDR10)
> + install(TARGETS hdr10plus
> + LIBRARY DESTINATION ${LIB_INSTALL_DIR}
> + ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
> + endif()
> if(LINKER_OPTIONS)
> # set_target_properties can't do list expansion
> string(REPLACE ";" " " LINKER_OPTION_STR "${LINKER_OPTIONS}")
> diff -r 82ba8c85f8e9 -r 25a7f0f74c9b source/dynamicHDR10/CMakeLists.txt
> --- a/source/dynamicHDR10/CMakeLists.txt Tue Jun 06 11:13:19 2017
> +0530
> +++ b/source/dynamicHDR10/CMakeLists.txt Tue Jun 13 15:15:55 2017
> +0530
> @@ -10,7 +10,6 @@
> hdr10plus.h
> api.cpp )
>
> -else()
> cmake_minimum_required (VERSION 2.8.11)
> project(dynamicHDR10)
> include(CheckIncludeFiles)
> @@ -150,26 +149,5 @@
>
> option(ENABLE_SHARED "Build shared library" OFF)
>
> -if(ENABLE_SHARED)
> - add_library(dynamicHDR10 SHARED
> - json11/json11.cpp json11/json11.h
> - BasicStructures.h
> - JsonHelper.cpp JsonHelper.h
> - metadataFromJson.cpp metadataFromJson.h
> - SeiMetadataDictionary.cpp SeiMetadataDictionary.h
> - hdr10plus.h api.cpp )
> -else()
> - add_library(dynamicHDR10 STATIC
> - json11/json11.cpp json11/json11.h
> - BasicStructures.h
> - JsonHelper.cpp JsonHelper.h
> - metadataFromJson.cpp metadataFromJson.h
> - SeiMetadataDictionary.cpp SeiMetadataDictionary.h
> - hdr10plus.h api.cpp )
> -endif()
> -
> -install (TARGETS dynamicHDR10
> - LIBRARY DESTINATION ${LIB_INSTALL_DIR}
> - ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
> install(FILES hdr10plus.h DESTINATION include)
> endif()
> \ No newline at end of file
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20170619/c7b0f635/attachment.html>
More information about the x265-devel
mailing list