0025653: DRAW doesn't use installed 3rdparty libraries from its library folder locate...
authoribs <ibs@opencascade.com>
Wed, 24 Dec 2014 09:57:17 +0000 (12:57 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 30 Apr 2015 10:01:03 +0000 (13:01 +0300)
adm/templates/3rdparty_macro.cmake
adm/templates/custom.bat.in
adm/templates/custom.sh.in
adm/templates/env.bat.in
adm/templates/freetype.cmake
adm/templates/tbb.cmake
adm/templates/tcl.cmake
adm/templates/vtk.cmake

index f19560c..9e47a49 100644 (file)
@@ -179,6 +179,15 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEB
     else()
       install (FILES "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}")
     endif()
+
+    set (USED_3RDPARTY_${PRODUCT_NAME}_DIR "")
+  else()
+    # the library directory for using by the executable
+    if (WIN32)
+      set (USED_3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}")
+    else()
+      set (USED_3RDPARTY_${PRODUCT_NAME}_DIR "${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}")
+    endif()
   endif()
   
   mark_as_advanced (3RDPARTY_${PRODUCT_NAME}_LIBRARY 3RDPARTY_${PRODUCT_NAME}_DLL)
index d278001..4ad4e2b 100644 (file)
@@ -3,12 +3,13 @@ echo off
 if "%VCVER%" == "@COMPILER@" (
   if "%ARCH%" == "@COMPILER_BITNESS@" (
     if "%CASDEB%" == "@BUILD_POSTFIX@" (
-      set "TCL_DIR=@3RDPARTY_TCL_DLL_DIR@"
-      set "FREETYPE_DIR=@3RDPARTY_FREETYPE_DLL_DIR@"
-      set "FREEIMAGE_DIR=@3RDPARTY_FREEIMAGE_DLL_DIR@"
-      set "GL2PS_DIR=@3RDPARTY_GL2PS_DLL_DIR@"
-      set "TBB_DIR=@3RDPARTY_TBB_DLL_DIR@"
-         set "VTK_DIR=@3RDPARTY_VTK_DLL_DIR@"
+      set "TCL_DIR=@USED_3RDPARTY_TCL_DIR@"
+      set "FREETYPE_DIR=@USED_3RDPARTY_FREETYPE_DIR@"
+      set "FREEIMAGE_DIR=@USED_3RDPARTY_FREEIMAGE_DIR@"
+      set "FREEIMAGEPLUS_DIR=@USED_3RDPARTY_FREEIMAGEPLUS_DIR@"
+      set "GL2PS_DIR=@USED_3RDPARTY_GL2PS_DIR@"
+      set "TBB_DIR=@USED_3RDPARTY_TBB_DIR@"
+      set "VTK_DIR=@USED_3RDPARTY_VTK_DIR@"
     )
   ) 
 )
index e5e0b89..28209d2 100644 (file)
@@ -3,12 +3,12 @@
 if [ "$COMPILER" == "@COMPILER@" ]; then
   if [ "$ARCH" == "@COMPILER_BITNESS@" ]; then
     if [ "$CASDEB" == "@BUILD_POSTFIX@" ]; then
-      export TCL_DIR="@3RDPARTY_TCL_LIBRARY_DIR@"
-      export FREETYPE_DIR="@3RDPARTY_FREETYPE_LIBRARY_DIR@"
-      export FREEIMAGE_DIR="@3RDPARTY_FREEIMAGE_LIBRARY_DIR@"
-      export GL2PS_DIR="@3RDPARTY_GL2PS_LIBRARY_DIR@"
-      export TBB_DIR="@3RDPARTY_TBB_LIBRARY_DIR@"
-         export VTK_DIR="@3RDPARTY_VTK_LIBRARY_DIR@"
+      export TCL_DIR="@USED_3RDPARTY_TCL_DIR@"
+      export FREETYPE_DIR="@USED_3RDPARTY_FREETYPE_DIR@"
+      export FREEIMAGE_DIR="@USED_3RDPARTY_FREEIMAGE_DIR@"
+      export GL2PS_DIR="@USED_3RDPARTY_GL2PS_DIR@"
+      export TBB_DIR="@USED_3RDPARTY_TBB_DIR@"
+      export VTK_DIR="@USED_3RDPARTY_VTK_DIR@"
     fi
   fi
 fi
index 7a8a4f4..04c6f65 100644 (file)
@@ -22,12 +22,13 @@ if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
 
 set "ORIGIN_PATH=%PATH%"
 
-if not ["%TCL_DIR%"] == [""]       set "PATH=%TCL_DIR%;%PATH%"
-if not ["%FREETYPE_DIR%"] == [""]  set "PATH=%FREETYPE_DIR%;%PATH%"
-if not ["%FREEIMAGE_DIR%"] == [""] set "PATH=%FREEIMAGE_DIR%;%PATH%"
-if not ["%GL2PS_DIR%"] == [""]     set "PATH=%GL2PS_DIR%;%PATH%"
-if not ["%TBB_DIR%"] == [""]       set "PATH=%TBB_DIR%;%PATH%"
-if not ["%VTK_DIR%"] == [""]       set "PATH=%VTK_DIR%;%PATH%"
+if not ["%TCL_DIR%"] == [""]           set "PATH=%TCL_DIR%;%PATH%"
+if not ["%FREETYPE_DIR%"] == [""]      set "PATH=%FREETYPE_DIR%;%PATH%"
+if not ["%FREEIMAGE_DIR%"] == [""]     set "PATH=%FREEIMAGE_DIR%;%PATH%"
+if not ["%FREEIMAGEPLUS_DIR%"] == [""] set "PATH=%FREEIMAGEPLUS_DIR%;%PATH%"
+if not ["%GL2PS_DIR%"] == [""]         set "PATH=%GL2PS_DIR%;%PATH%"
+if not ["%TBB_DIR%"] == [""]           set "PATH=%TBB_DIR%;%PATH%"
+if not ["%VTK_DIR%"] == [""]           set "PATH=%VTK_DIR%;%PATH%"
 
 rem ----- Set path to 3rd party and OCCT libraries -----
 set "BIN_TAIL=win%ARCH%/%VCVER%/bin%CASDEB%"
index b787096..6f88830 100644 (file)
@@ -223,6 +223,15 @@ if (INSTALL_FREETYPE)
   else()
     install (FILES "${3RDPARTY_FREETYPE_LIBRARY}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}")
   endif()
+
+  set (USED_3RDPARTY_FREETYPE_DIR "")
+else()
+  # the library directory for using by the executable
+  if (WIN32)
+    set (USED_3RDPARTY_FREETYPE_DIR ${3RDPARTY_FREETYPE_DLL_DIR})
+  else()
+    set (USED_3RDPARTY_FREETYPE_DIR ${3RDPARTY_FREETYPE_LIBRARY_DIR})
+  endif()
 endif()
 
 # unset all redundant variables
index fa53392..7b7da7b 100644 (file)
@@ -236,6 +236,15 @@ if (INSTALL_TBB)
   else()
     install (FILES ${3RDPARTY_TBB_LIBRARY} ${3RDPARTY_TBBMALLOC_LIBRARY} DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}")
   endif()
+
+  set (USED_3RDPARTY_TBB_DIR "")
+else()
+  # the library directory for using by the executable
+  if (WIN32)
+    set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_DLL_DIR})
+  else()
+    set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_LIBRARY_DIR})
+  endif()
 endif()
 
 mark_as_advanced (3RDPARTY_TBB_LIBRARY 3RDPARTY_TBBMALLOC_LIBRARY 3RDPARTY_TBB_DLL 3RDPARTY_TBBMALLOC_DLL)
index c5f26aa..b5306f8 100644 (file)
@@ -318,6 +318,15 @@ if (INSTALL_TCL)
     message (STATUS "\nWarning: tclX.X and tkX.X subdirs won't be copyied during the installation process.")
     message (STATUS "Try seeking tcl within another folder by changing 3RDPARTY_TCL_DIR variable.")
   endif()
+
+  set (USED_3RDPARTY_TCL_DIR "")
+else()
+  # the library directory for using by the executable
+  if (WIN32)
+    set (USED_3RDPARTY_TCL_DIR ${3RDPARTY_TCL_DLL_DIR})
+  else()
+    set (USED_3RDPARTY_TCL_DIR ${3RDPARTY_TCL_LIBRARY_DIR})
+  endif()
 endif()
 
 mark_as_advanced (3RDPARTY_TCL_LIBRARY 3RDPARTY_TK_LIBRARY 3RDPARTY_TCL_DLL 3RDPARTY_TK_DLL)
index bd1495f..93c0635 100644 (file)
@@ -151,6 +151,15 @@ if (INSTALL_VTK)
       install(FILES "${3RDPARTY_VTK_LIBRARY_DIR}/lib${VTK_DLL_NAME}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}" RENAME "lib${VTK_DLL_NAME}")
     endforeach()
   endif()
+
+  set (USED_3RDPARTY_VTK_DIR "")
+else()
+  # the library directory for using by the executable
+  if (WIN32)
+    set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_DLL_DIR})
+  else()
+    set (USED_3RDPARTY_VTK_DIR ${3RDPARTY_VTK_LIBRARY_DIR})
+  endif()
 endif()
 
 mark_as_advanced (VTK_INCLUDE_DIRS VTK_LIBRARY_DIRS VTK_DIR)