cmake: expose BUILD_SHARED_LIBS in cmake-gui This change exposes `BUILD_SHARED_LIBS`, which controls whether shared libraries are built. This should be used instead of `CONFIG_SHARED`, which is an internal configuration variable that does not change the build targets. More work is needed to mark certain variables, like this one, as advanced (`mark_as_advanced()`) to avoid confusion. Bug: 437872594 Change-Id: I027c00f2eaaff96205a4552ecc8c816f561c2dce
diff --git a/cmake/aom_config_defaults.cmake b/cmake/aom_config_defaults.cmake index 4590ed4..6546b43 100644 --- a/cmake/aom_config_defaults.cmake +++ b/cmake/aom_config_defaults.cmake
@@ -14,6 +14,13 @@ # config variables are added to the CMake variable cache via the macros provided # in util.cmake. +# Only run if this is the main project. +if(CMAKE_PROJECT_NAME STREQUAL "AOM") + # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to + # make it prominent in the GUI. + option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF) +endif() + # # The variables in this section of the file are detected at configuration time, # but can be overridden via the use of CONFIG_* and ENABLE_* values also defined