Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 26 additions & 11 deletions builtins/openui5/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
set(OPENUI5_VERSION "1.152.0")

ExternalProject_Add(
OPENUI5
URL ${lcgpackages}/openui5-runtime-${OPENUI5_VERSION}.zip
URL_HASH SHA256=4882023d4760ed4c20602e36dd183b02a538fc7e8bbfda607b6e25bd1cbbcdb1
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
SOURCE_DIR ${CMAKE_BINARY_DIR}/ui5/distribution
TIMEOUT 600
)
install(DIRECTORY ${CMAKE_BINARY_DIR}/ui5/distribution/ DESTINATION ${CMAKE_INSTALL_OPENUI5DIR}/distribution/ COMPONENT libraries FILES_MATCHING PATTERN "*")
if(DEFINED OPENUI5_SOURCE_DIR)
# Use an already unpacked openui5 runtime distribution instead of
# downloading it, analogous to CLAD_SOURCE_DIR for clad. This allows to
# build ROOT without network access.
if(NOT EXISTS "${OPENUI5_SOURCE_DIR}/resources/sap-ui-core.js")
message(FATAL_ERROR "OPENUI5_SOURCE_DIR=${OPENUI5_SOURCE_DIR} does not contain an openui5 runtime distribution (resources/sap-ui-core.js not found)")
endif()
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/ui5)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
${OPENUI5_SOURCE_DIR} ${CMAKE_BINARY_DIR}/ui5/distribution)
set(_openui5_distribution_dir ${OPENUI5_SOURCE_DIR})
else()
ExternalProject_Add(
OPENUI5
URL ${lcgpackages}/openui5-runtime-${OPENUI5_VERSION}.zip
URL_HASH SHA256=4882023d4760ed4c20602e36dd183b02a538fc7e8bbfda607b6e25bd1cbbcdb1
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
SOURCE_DIR ${CMAKE_BINARY_DIR}/ui5/distribution
TIMEOUT 600
)
set(_openui5_distribution_dir ${CMAKE_BINARY_DIR}/ui5/distribution)
endif()

install(DIRECTORY ${_openui5_distribution_dir}/ DESTINATION ${CMAKE_INSTALL_OPENUI5DIR}/distribution/ COMPONENT libraries FILES_MATCHING PATTERN "*")
10 changes: 6 additions & 4 deletions cmake/modules/SearchInstalledSoftware.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1128,10 +1128,12 @@ if(webgui)
$ENV{OPENUI5DIR} ${CMAKE_BINARY_DIR}/ui5/distribution)
else()
if(builtin_openui5)
ROOT_CHECK_CONNECTION("builtin_openui5=OFF")
if (NO_CONNECTION)
message(SEND_ERROR "builtin_openui5=ON requires internet connection, check it or disable feature")
list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_openui5=OFF)
if(NOT DEFINED OPENUI5_SOURCE_DIR)
ROOT_CHECK_CONNECTION("builtin_openui5=OFF")
if (NO_CONNECTION)
message(SEND_ERROR "builtin_openui5=ON requires internet connection, check it or disable feature")
list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_openui5=OFF)
endif()
endif()
add_subdirectory(builtins/openui5)
else()
Expand Down
Loading