]> OCCT Git - occt.git/commitdiff
Configuration - Second installation failed #129
authordpasukhi <dpasukhi@opencascade.com>
Mon, 28 Oct 2024 15:52:38 +0000 (15:52 +0000)
committerdpasukhi <dpasukhi@opencascade.com>
Mon, 28 Oct 2024 15:52:38 +0000 (15:52 +0000)
After first installation, second will be failed
Regression after#97

CMakeLists.txt

index 8507b7fb15781b55016c8293d5515de2498b8659..c1705f9441b2bd7b526b48ae4eaf617c3afdb7a8 100644 (file)
@@ -1036,9 +1036,10 @@ endif()
 # validating custom.bat/sh for changes
 if (EXISTS "${CMAKE_BINARY_DIR}/custom.${SCRIPT_EXT}" AND EXISTS "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}")
   file (READ "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}" CUSTOM_CONTENT)
-  if (NOT "${CUSTOM_CONTENT}" MATCHES "${ADDITIONAL_CUSTOM_CONTENT}")
+  string(FIND "${CUSTOM_CONTENT}" "${ADDITIONAL_CUSTOM_CONTENT}" pos)
+  if (pos EQUAL -1)
     set (CUSTOM_CONTENT "${CUSTOM_CONTENT} ${ADDITIONAL_CUSTOM_CONTENT}")
-    OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}")
+    OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${INSTALL_DIR_SCRIPT}")
   endif()
 else()
   OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${INSTALL_DIR_SCRIPT}")