MantisBT - Community
View Issue Details
0030977Community[OCCT] OCCT:Configurationpublic2019-09-17 13:382020-09-11 17:08
mblanchard 
bugmaster 
normalminor 
assignedopen 
WindowsWindowsWindows 10
[OCCT] 7.3.0 
[OCCT] 7.6.0* 
0030977: Configuration, CMake - OpenCASCADEConfig.cmake defines wrong dependency paths with -DINSTALL_FREETYPE=On
Building on Windows using CMake, specifying -DINSTALL_FREETYPE=On and -DINSTALL_TCL=On, it seems like the generated OpenCASCADEConfig.cmake defines target with dependency to build-time (non-installed) FreeType and Tcl/Tk libraries.

If FreeType and Tcl/Tk are installed (and thus copied into the OCCT final installation directory), I'd expect OCCT's CMake config script to define linker flags pointing at these copies instead of the one used at compile time.
1. Build shared+debug OCCT:
cmake -Bwin64-msvc2015-debug-shared -GNinja -DCMAKE_BUILD_TYPE=Release -DINSTALL_FREETYPE=On -D3RDPARTY_FREETYPE_DIR=/d/opt/nf-libs/freetype-2.5.5/win64-msvc2015-debug-shared 
-DINSTALL_TCL=On -D3RDPARTY_TCL_DIR=/d/opt/nf-libs/tcltk-8.6.2/win64-msvc2015-debug-shared -D3RDPARTY_TK_DIR=/d/opt/nf-libs/tcltk-8.6.2/win64-msvc2015-debug-shared 
-DCMAKE_INSTALL_PREFIX=/d/opt/nf-libs/opencascade-7.3.0/win64-msvc2015-debug-shared

2. Inspect generated CMake config. scripts:

grep -rni freetype /d/opt/nf-libs/opencascade-7.3.0/win64-msvc2015-debug-shared/cmake


OpenCASCADEDrawTargets.cmake:69:  INTERFACE_LINK_LIBRARIES "TKGeomBase;TKFillet;TKBRep;TKTopAlgo;TKHLR;TKernel;TKMath;TKService;TKShHealing;TKBool;TKPrim;TKGeomAlgo;TKG2d;TKTopTest;TKG3d;TKOffset;TKMesh;TKV3d;TKDraw;TKOpenGl;D:/opt/nf-libs/tcltk-8.6.2/win64-msvc2015-release-shared/lib/tcl86.lib;D:/opt/nf-libs/tcltk-8.6.2/win64-msvc2015-release-shared/lib/tk86.lib;user32.lib;gdi32.lib;opengl32.lib;D:/opt/nf-libs/freetype-2.5.5/win64-msvc2015-release-shared/lib/freetype.lib"

OpenCASCADEVisualizationTargets.cmake:55:  INTERFACE_LINK_LIBRARIES "TKernel;TKMath;TKBRep;TKShHealing;TKGeomBase;TKGeomAlgo;TKG2d;TKG3d;TKTopAlgo;opengl32.lib;windowscodecs;D:/opt/nf-libs/freetype-2.5.5/win64-msvc2015-release-shared/lib/freetype.lib"

OpenCASCADEVisualizationTargets.cmake:62:  INTERFACE_LINK_LIBRARIES "TKBRep;TKMath;TKernel;TKService;TKShHealing;TKTopAlgo;TKG2d;TKG3d;TKGeomBase;TKMesh;TKGeomAlgo;TKHLR;user32.lib;gdi32.lib;opengl32.lib;D:/opt/nf-libs/freetype-2.5.5/win64-msvc2015-release-shared/lib/freetype.lib"

OpenCASCADEVisualizationTargets.cmake:69:  INTERFACE_LINK_LIBRARIES "TKernel;TKService;TKMath;TKV3d;D:/opt/nf-libs/freetype-2.5.5/win64-msvc2015-release-shared/lib/freetype.lib;opengl32.lib;user32.lib;gdi32.lib"

No tags attached.
Issue History
2019-09-17 13:38mblanchardNew Issue
2019-09-17 13:38mblanchardAssigned To => bugmaster
2020-03-03 10:24bugmasterAssigned Tobugmaster => apn
2020-03-03 10:24bugmasterStatusnew => assigned
2020-03-04 11:39kgvSummaryOpenCASCADEConfig.cmake defines wromg dependency paths => Configuration, CMake - OpenCASCADEConfig.cmake defines wromg dependency paths
2020-03-04 11:43kgvSeveritymajor => minor
2020-03-04 11:43kgvTarget Version => 7.5.0
2020-03-04 11:43kgvSummaryConfiguration, CMake - OpenCASCADEConfig.cmake defines wromg dependency paths => Configuration, CMake - OpenCASCADEConfig.cmake defines wrong dependency paths with -DINSTALL_FREETYPE=On
2020-03-04 11:43kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22635#r22635
2020-03-04 11:43kgvAdditional Information Updatedbug_revision_view_page.php?rev_id=22637#r22637
2020-09-11 15:37utverdovAssigned Toapn => inv
2020-09-11 15:40utverdovTarget Version7.5.0 => 7.6.0*
2020-09-11 17:08bugmasterAssigned Toinv => bugmaster

There are no notes attached to this issue.