From: Pasukhin Dmitry Date: Sun, 27 Jul 2025 11:33:37 +0000 (+0100) Subject: Configuration, CMake - Build config file is invalid (#647) X-Git-Tag: V8_0_0_rc2~4 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=3175e001b1392f8cb4470cd810b938b7061b1f8d;p=occt.git Configuration, CMake - Build config file is invalid (#647) - Fixed missing `@` delimiter in template variable substitution for QT directory detection - Added compiler bitness calculation before custom script generation - Implemented nested variable expansion for custom build paths --- diff --git a/CMakeLists.txt b/CMakeLists.txt index bed7cc3472..40c561e86b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1203,6 +1203,7 @@ if (${DRAWEXE_INDEX} GREATER -1) OCCT_COPY_FILE_OR_DIR ("adm/templates/draw.${SCRIPT_EXT}" "${CMAKE_BINARY_DIR}") endif() +OCCT_MAKE_COMPILER_BITNESS() set (SUB_CUSTOM_NAME "custom_${COMPILER}_${COMPILER_BITNESS}.${SCRIPT_EXT}") if (WIN32) @@ -1333,6 +1334,11 @@ else() endif() endif() +# Expand OCCT_CUSTOM_BUILD_BIN_LIB_PATHS variable to resolve nested @...@ variables +if (OCCT_CUSTOM_BUILD_BIN_LIB_PATHS) + string(CONFIGURE "${OCCT_CUSTOM_BUILD_BIN_LIB_PATHS}" OCCT_CUSTOM_BUILD_BIN_LIB_PATHS @ONLY) +endif() + # write current custom.bat/sh (for build directory) OCCT_CONFIGURE ("adm/templates/custom.build.${SCRIPT_EXT}.in" "${SUB_CUSTOM_NAME}") diff --git a/adm/templates/custom.build.sh.in b/adm/templates/custom.build.sh.in index e4352418fb..f281aeaed1 100644 --- a/adm/templates/custom.build.sh.in +++ b/adm/templates/custom.build.sh.in @@ -14,7 +14,7 @@ if [ "$1" == "@BIN_LETTER@" ]; then export FFMPEG_DIR="@3RDPARTY_FFMPEG_LIBRARY_DIR@" export JEMALLOC_DIR="@3RDPARTY_JEMALLOC_LIBRARY_DIR@" - if [ "x@3RDPARTY_QT_DIR" != "x" ]; then + if [ "x@3RDPARTY_QT_DIR@" != "x" ]; then export QTDIR="@3RDPARTY_QT_DIR@" fi