mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-17 15:25:35 +00:00
491f452dd7
Currently you can't use GUI_EXE without BUILD_GUI, but BUILD_GUI also requires the yarn command (even though it will never use it when GUI_EXE is set). This commit fixes it: - Make `GUI_EXE` a windows-only top-level project options, rather than being guarded by `BUILD_GUI`. - Make `BUILD_GUI` control *building* the GUI instead of bundling it. - GUI_EXE and BUILD_GUI are now mutually exclusive.
18 lines
466 B
CMake
18 lines
466 B
CMake
set(default_build_gui OFF)
|
|
if(APPLE OR WIN32)
|
|
set(default_build_gui ON)
|
|
endif()
|
|
|
|
if(WIN32)
|
|
set(GUI_EXE "" CACHE FILEPATH "path to a pre-built Windows GUI .exe to use (implies -DBUILD_GUI=OFF)")
|
|
if(GUI_EXE)
|
|
set(default_build_gui OFF)
|
|
endif()
|
|
endif()
|
|
|
|
option(BUILD_GUI "build electron gui from 'gui' submodule source" ${default_build_gui})
|
|
|
|
if(BUILD_GUI AND GUI_EXE)
|
|
message(FATAL_ERROR "-DGUI_EXE=... and -DBUILD_GUI=ON are mutually exclusive")
|
|
endif()
|