fix macos assemble_gui dependency

The `sign` target on macos was not working properly -- the signing
script would run before the build is finished.  This was caused by
cmake/macos.cmake having an `if(BUILD_GUI)`, but BUILD_GUI isn't defined
as an option until cmake/gui.cmake, which hadn't been included yet where
macos.cmake was included.

This extracts just the `option(BUIL_GUI)` from gui.cmake into a separate
gui-option.cmake file that we can load earlier to fix it.

While here I also noticed the GUI_EXE setting was defined as an option,
but isn't actually a boolean value, as an option, but isn't actually a
boolean value, so fixed it by making it a `set(... CACHE FILEPATH ...)`.
pull/1997/head
Jason Rhinelander 2 years ago
parent 9f258700b7
commit bac3f9dca1
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262

@ -114,6 +114,8 @@ if (STATIC_LINK)
message(STATUS "setting static library suffix search")
endif()
include(cmake/gui-option.cmake)
include(cmake/solaris.cmake)
include(cmake/win32.cmake)
include(cmake/macos.cmake)

@ -0,0 +1,6 @@
set(default_build_gui OFF)
if(APPLE OR WIN32)
set(default_build_gui ON)
endif()
option(BUILD_GUI "build electron gui from 'gui' submodule source" ${default_build_gui})

@ -1,22 +1,15 @@
set(default_build_gui OFF)
set(default_gui_target pack)
if(APPLE)
set(default_build_gui ON)
set(default_gui_target macos:raw)
elseif(WIN32)
set(default_build_gui ON)
set(default_gui_target win32)
set(GUI_EXE "" CACHE FILEPATH "path to an externally built lokinet gui.exe")
endif()
if(WIN32)
option(GUI_EXE "path to an externally built lokinet gui.exe" OFF)
endif()
option(BUILD_GUI "build electron gui from 'gui' submodule source" ${default_build_gui})
set(GUI_YARN_TARGET "${default_gui_target}" CACHE STRING "yarn target for building the GUI")
set(GUI_YARN_EXTRA_OPTS "" CACHE STRING "extra options to pass into the yarn build command")
if (BUILD_GUI)
message(STATUS "Building lokinet-gui")
# allow manually specifying yarn with -DYARN=

Loading…
Cancel
Save