diff --git a/adm/templates/3rdparty_macro.cmake b/adm/templates/3rdparty_macro.cmake index f19560c22d..9e47a497a0 100644 --- a/adm/templates/3rdparty_macro.cmake +++ b/adm/templates/3rdparty_macro.cmake @@ -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) diff --git a/adm/templates/custom.bat.in b/adm/templates/custom.bat.in index d2780010f6..4ad4e2b750 100644 --- a/adm/templates/custom.bat.in +++ b/adm/templates/custom.bat.in @@ -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@" ) ) ) diff --git a/adm/templates/custom.sh.in b/adm/templates/custom.sh.in index e5e0b89b82..28209d2216 100644 --- a/adm/templates/custom.sh.in +++ b/adm/templates/custom.sh.in @@ -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 diff --git a/adm/templates/env.bat.in b/adm/templates/env.bat.in index 7a8a4f4215..04c6f65c03 100644 --- a/adm/templates/env.bat.in +++ b/adm/templates/env.bat.in @@ -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%" diff --git a/adm/templates/freetype.cmake b/adm/templates/freetype.cmake index b7870964bd..6f88830ccb 100644 --- a/adm/templates/freetype.cmake +++ b/adm/templates/freetype.cmake @@ -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 diff --git a/adm/templates/tbb.cmake b/adm/templates/tbb.cmake index fa53392f6a..7b7da7b378 100644 --- a/adm/templates/tbb.cmake +++ b/adm/templates/tbb.cmake @@ -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) diff --git a/adm/templates/tcl.cmake b/adm/templates/tcl.cmake index c5f26aab1f..b5306f88d6 100644 --- a/adm/templates/tcl.cmake +++ b/adm/templates/tcl.cmake @@ -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) diff --git a/adm/templates/vtk.cmake b/adm/templates/vtk.cmake index bd1495f15c..93c0635229 100644 --- a/adm/templates/vtk.cmake +++ b/adm/templates/vtk.cmake @@ -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)