]> OCCT Git - occt.git/commitdiff
Configuration, CMake - Build config file is invalid (#647)
authorPasukhin Dmitry <dpasukhi@opencascade.com>
Sun, 27 Jul 2025 11:33:37 +0000 (12:33 +0100)
committerGitHub <noreply@github.com>
Sun, 27 Jul 2025 11:33:37 +0000 (12:33 +0100)
- 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

CMakeLists.txt
adm/templates/custom.build.sh.in

index bed7cc34727ac9c42baeb998d3b25eb5021d5af8..40c561e86b44ef81e2d3a5d224277eaae3e37f2a 100644 (file)
@@ -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}")
 
index e4352418fb2a56d313e0a31b66fc01f6018cb39f..f281aeaed10ad3ad87d1803eab9a4d8dc3789b8b 100644 (file)
@@ -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