UI: Set ENABLE_UI and DISABLE_UI as root CMake variables

Allows for projects other than UI to be able to reference these CMake
variables.
master
jp9000 2017-12-25 13:06:41 -08:00
parent f06f85fd56
commit 260fb571b8
2 changed files with 7 additions and 2 deletions

View File

@ -103,8 +103,14 @@ option(BUILD_TESTS "Build test directory (includes test sources and possibly a p
mark_as_advanced(BUILD_TESTS)
if(NOT INSTALLER_RUN)
add_subdirectory(deps)
option(ENABLE_UI "Enables the OBS user interfaces" ON)
if(DISABLE_UI OR NOT ENABLE_UI)
set(UI_ENABLED FALSE)
else()
set(UI_ENABLED TRUE)
endif()
add_subdirectory(deps)
if(WIN32)
add_subdirectory(libobs-d3d11)

View File

@ -1,4 +1,3 @@
option(ENABLE_UI "Enables the OBS user interfaces" ON)
if(DISABLE_UI)
message(STATUS "UI disabled")
return()