Meta: Don't install CA certificates during a on-Serenity build

`SERENITYOS` is also set when compiling Lagom on SerenityOS, so we can't
just check it and expect `CMAKE_STAGING_PREFIX` to be set.

Instead, check `CMAKE_STAGING_PREFIX` directly and use that as an
indicator for whether we can install a file there.
This commit is contained in:
Tim Schumacher 2023-03-19 23:25:25 +01:00 committed by Andreas Kling
parent f7dc4396c8
commit fb0fd85e97
Notes: sideshowbarker 2024-07-17 07:14:09 +09:00

View file

@ -14,7 +14,7 @@ if (ENABLE_CACERT_DOWNLOAD)
download_file("${CACERT_URL}" "${CACERT_PATH}/${CACERT_FILE}")
if (SERENITYOS)
if (NOT "${CMAKE_STAGING_PREFIX}" STREQUAL "")
set(CACERT_INSTALL_PATH ${CMAKE_STAGING_PREFIX}/etc/${CACERT_INSTALL_FILE})
else()
set(CACERT_INSTALL_PATH ${CMAKE_CURRENT_BINARY_DIR}/${CACERT_INSTALL_FILE})