From d51a0ff64afff6582e56f4a77ce38f8acf647aac Mon Sep 17 00:00:00 2001 From: ski Date: Tue, 18 Apr 2017 12:48:53 +0300 Subject: [PATCH] 0028658: Cannot execute DRAW.exe with draw.bat Macro THIRDPARTY_PRODUCT was updated to create separate variable which contains all used 3rdparty dll/library directories (used custom.bat/sh files). Name of Tcl/Tk libraries for search were updated. --- adm/cmake/3rdparty_macro.cmake | 30 +++++++++++++++++++++++------ adm/cmake/occt_csf.cmake | 4 ++-- adm/templates/custom.build.bat.in | 8 ++++---- adm/templates/custom.build.sh.in | 4 ++-- adm/templates/custom.install.bat.in | 8 ++++---- adm/templates/custom.install.sh.in | 4 ++-- 6 files changed, 38 insertions(+), 20 deletions(-) diff --git a/adm/cmake/3rdparty_macro.cmake b/adm/cmake/3rdparty_macro.cmake index 06f343ec32..4515a4060f 100644 --- a/adm/cmake/3rdparty_macro.cmake +++ b/adm/cmake/3rdparty_macro.cmake @@ -193,7 +193,22 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME endif() endif() - set (USED_3RDPARTY_${PRODUCT_NAME}_DIR "") + if (WIN32) + set (3RDPARTY_${PRODUCT_NAME}_DLL_DIRS "") + else() + set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS "") + endif() + + foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}}) + string (REPLACE "." "" LIBRARY_NAME_SUFFIX "${LIBRARY_NAME}") + if (WIN32) + set (3RDPARTY_${PRODUCT_NAME}_DLL_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}};${3RDPARTY_${PRODUCT_NAME}_DLL_DIRS}") + else() + set (3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}:${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIRS}") + endif() + endforeach() + + set (USED_3RDPARTY_${PRODUCT_NAME}_DIRS "") if (INSTALL_${PRODUCT_NAME}) OCCT_MAKE_OS_WITH_BITNESS() @@ -260,11 +275,14 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME endif() else() # the library directory for using by the executable - if (WIN32) - set (USED_3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}}") - else() - set (USED_3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}") - endif() + foreach (LIBRARY_NAME ${${LIBRARY_CSF_NAME}}) + string (REPLACE "." "" LIBRARY_NAME_SUFFIX "${LIBRARY_NAME}") + if (WIN32) + set (USED_3RDPARTY_${PRODUCT_NAME}_DIRS "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR_${LIBRARY_NAME_SUFFIX}};${USED_3RDPARTY_${PRODUCT_NAME}_DIRS}") + else() + set (USED_3RDPARTY_${PRODUCT_NAME}_DIRS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR_${LIBRARY_NAME_SUFFIX}}:${USED_3RDPARTY_${PRODUCT_NAME}_DIRS}") + endif() + endforeach() endif() mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY_${LIBRARY_NAME_SUFFIX} 3RDPARTY_${PRODUCT_NAME}_DLL_${LIBRARY_NAME_SUFFIX}) diff --git a/adm/cmake/occt_csf.cmake b/adm/cmake/occt_csf.cmake index e71e928a40..4bb1d48b03 100644 --- a/adm/cmake/occt_csf.cmake +++ b/adm/cmake/occt_csf.cmake @@ -34,8 +34,8 @@ endif() # TCL/TK if (USE_TCL) if (WIN32) - set (CSF_TclLibs "tcl8.6") - set (CSF_TclTkLibs "tk8.6") + set (CSF_TclLibs "tcl86") + set (CSF_TclTkLibs "tk86") else() if(APPLE) set (CSF_TclTkLibs Tk) diff --git a/adm/templates/custom.build.bat.in b/adm/templates/custom.build.bat.in index 25cc9c0971..666d5946b3 100644 --- a/adm/templates/custom.build.bat.in +++ b/adm/templates/custom.build.bat.in @@ -8,10 +8,10 @@ if /I "%VCVER%" == "@COMPILER@" ( set "TCL_DIR=@3RDPARTY_TCL_DLL_DIR@" set "TK_DIR=@3RDPARTY_TK_DLL_DIR@" set "FREETYPE_DIR=@3RDPARTY_FREETYPE_DLL_DIR@" - set "FREEIMAGE_DIR=@3RDPARTY_FREEIMAGE_DLL_DIR@" - set "EGL_DIR=@3RDPARTY_EGL_DLL_DIR@" - set "GLES2_DIR=@3RDPARTY_GLES2_DLL_DIR@" - set "GL2PS_DIR=@3RDPARTY_GL2PS_DLL_DIR@" + set "FREEIMAGE_DIR=@3RDPARTY_FREEIMAGE_DLL_DIRS@" + set "EGL_DIR=@3RDPARTY_EGL_DLL_DIRS@" + set "GLES2_DIR=@3RDPARTY_GLES2_DLL_DIRS@" + set "GL2PS_DIR=@3RDPARTY_GL2PS_DLL_DIRS@" set "TBB_DIR=@3RDPARTY_TBB_DLL_DIR@" set "VTK_DIR=@3RDPARTY_VTK_DLL_DIR@" diff --git a/adm/templates/custom.build.sh.in b/adm/templates/custom.build.sh.in index 6830a6bf03..bb31eda74a 100644 --- a/adm/templates/custom.build.sh.in +++ b/adm/templates/custom.build.sh.in @@ -8,8 +8,8 @@ if [ "$1" == "@BIN_LETTER@" ]; then export TCL_DIR="@3RDPARTY_TCL_LIBRARY_DIR@" export TK_DIR="@3RDPARTY_TK_LIBRARY_DIR@" export FREETYPE_DIR="@3RDPARTY_FREETYPE_LIBRARY_DIR@" - export FREEIMAGE_DIR="@3RDPARTY_FREEIMAGE_LIBRARY_DIR@" - export GL2PS_DIR="@3RDPARTY_GL2PS_LIBRARY_DIR@" + export FREEIMAGE_DIR="@3RDPARTY_FREEIMAGE_LIBRARY_DIRS@" + export GL2PS_DIR="@3RDPARTY_GL2PS_LIBRARY_DIRS@" export TBB_DIR="@3RDPARTY_TBB_LIBRARY_DIR@" export VTK_DIR="@3RDPARTY_VTK_LIBRARY_DIR@" diff --git a/adm/templates/custom.install.bat.in b/adm/templates/custom.install.bat.in index 4cdd0b8d35..af2a81e15a 100644 --- a/adm/templates/custom.install.bat.in +++ b/adm/templates/custom.install.bat.in @@ -10,10 +10,10 @@ if /I "%VCVER%" == "@COMPILER@" ( set "TCL_DIR=@USED_3RDPARTY_TCL_DIR@" set "TK_DIR=@USED_3RDPARTY_TK_DIR@" set "FREETYPE_DIR=@USED_3RDPARTY_FREETYPE_DIR@" - set "FREEIMAGE_DIR=@USED_3RDPARTY_FREEIMAGE_DIR@" - set "EGL_DIR=@USED_3RDPARTY_EGL_DIR@" - set "GLES2_DIR=@USED_3RDPARTY_GLES2_DIR@" - set "GL2PS_DIR=@USED_3RDPARTY_GL2PS_DIR@" + set "FREEIMAGE_DIR=@USED_3RDPARTY_FREEIMAGE_DIRS@" + set "EGL_DIR=@USED_3RDPARTY_EGL_DIRS@" + set "GLES2_DIR=@USED_3RDPARTY_GLES2_DIRS@" + set "GL2PS_DIR=@USED_3RDPARTY_GL2PS_DIRS@" set "TBB_DIR=@USED_3RDPARTY_TBB_DIR@" set "VTK_DIR=@USED_3RDPARTY_VTK_DIR@" diff --git a/adm/templates/custom.install.sh.in b/adm/templates/custom.install.sh.in index 855970a43d..d383dff723 100644 --- a/adm/templates/custom.install.sh.in +++ b/adm/templates/custom.install.sh.in @@ -8,8 +8,8 @@ if [ "$1" == "@BIN_LETTER@" ]; then export TCL_DIR="@USED_3RDPARTY_TCL_DIR@" export TK_DIR="@USED_3RDPARTY_TK_DIR@" export FREETYPE_DIR="@USED_3RDPARTY_FREETYPE_DIR@" - export FREEIMAGE_DIR="@USED_3RDPARTY_FREEIMAGE_DIR@" - export GL2PS_DIR="@USED_3RDPARTY_GL2PS_DIR@" + export FREEIMAGE_DIR="@USED_3RDPARTY_FREEIMAGE_DIRS@" + export GL2PS_DIR="@USED_3RDPARTY_GL2PS_DIRS@" export TBB_DIR="@USED_3RDPARTY_TBB_DIR@" export VTK_DIR="@USED_3RDPARTY_VTK_DIR@"