From 6a4aabd5e9c116f948dfd408d10573c35b70dc51 Mon Sep 17 00:00:00 2001 From: Gerion Entrup <32870336+gerion0@users.noreply.github.com> Date: Tue, 23 Feb 2021 20:41:14 +0100 Subject: [PATCH] webserver/Cmake: fix out-of-tree build (#1147) Related: #834 --- libsrc/webserver/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libsrc/webserver/CMakeLists.txt b/libsrc/webserver/CMakeLists.txt index 175df60e..3a6843dd 100644 --- a/libsrc/webserver/CMakeLists.txt +++ b/libsrc/webserver/CMakeLists.txt @@ -5,9 +5,10 @@ set(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/webserver) FILE ( GLOB WebConfig_SOURCES "${CURRENT_HEADER_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.cpp" ) FILE ( GLOB_RECURSE webFiles RELATIVE ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/assets/webconfig/* ) +FILE ( RELATIVE_PATH webConfigPath ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/assets/webconfig) FOREACH( f ${webFiles} ) - STRING ( REPLACE "../assets/webconfig/" "" fname ${f}) + STRING ( REPLACE "${webConfigPath}/" "" fname ${f}) SET(HYPERION_WEBCONFIG_RES "${HYPERION_WEBCONFIG_RES}\n\t\t${f}") ENDFOREACH() CONFIGURE_FILE(${CURRENT_SOURCE_DIR}/WebConfig.qrc.in ${CMAKE_BINARY_DIR}/WebConfig.qrc )