From 1a4cfa05ccb5472b26faef61263a8aaca593c00a Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Tue, 18 Jul 2017 16:17:37 +0200 Subject: [PATCH] Don't use an option for WITH_GFX_H264 CMAKE_DEPENDENT_OPTION the option is initialized on the first run and then saved. Later configuration changes are not considered anymore. Therefor use an variable instead of an option here. --- CMakeLists.txt | 6 ++++++ cmake/ConfigOptions.cmake | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f6095ac7a..09717186d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -784,6 +784,12 @@ if (TARGET_ARCH MATCHES "sparc") set(HAVE_ALIGNED_REQUIRED 1) endif() +if (WITH_X264 OR WITH_OPENH264 OR WITH_MEDIA_FOUNDATION OR WITH_FFMPEG) + set(WITH_GFX_H264 ON) +else() + set(WITH_GFX_H264 OFF) +endif() + # Android expects all libraries to be loadable # without paths. if (ANDROID) diff --git a/cmake/ConfigOptions.cmake b/cmake/ConfigOptions.cmake index 762bcf0ae..523ba3b65 100644 --- a/cmake/ConfigOptions.cmake +++ b/cmake/ConfigOptions.cmake @@ -50,8 +50,6 @@ else() option(WITH_MEDIA_FOUNDATION "Enable H264 media foundation decoder." ON) endif() endif() -CMAKE_DEPENDENT_OPTION(WITH_GFX_H264 "Build GFX H264 support. A backend (OpenH264|FFMPEG|X264|MediaFoundation) must also be compiled in." ON - "WITH_X264 OR WITH_OPENH264 OR WITH_MEDIA_FOUNDATION OR WITH_FFMPEG" OFF) if(WIN32 AND NOT UWP) option(WITH_NATIVE_SSPI "Use native SSPI modules" ON)