Personal tools
You are here: Home Forum How to use Salome? About occt dependency generation in CMake

About occt dependency generation in CMake

Up to How to use Salome?

About occt dependency generation in CMake

Posted by Leon at April 12. 2021

Hi all,

I have a question about the OCCT dependency generation in CMake, here it is:

in OCCT cmake file, it always generated a wrong file path with wierd strings, like the following:

in OpenCASCADEFoundationClassesTargets.cmake file, it has contents:

# Create imported target TKernel
add_library(TKernel SHARED IMPORTED)

set_target_properties(TKernel PROPERTIES
  INTERFACE_LINK_LIBRARIES "advapi32.lib;gdi32.lib;user32.lib;D:/SALOME-9.3.0-9.3.0-9.3.0/PRODUCTSD/tbb-4.4.5/lib/intel64/vc14/tbb.lib;D:/SALOME-9.3.0-9.3.0-9.3.0/PRODUCTSD/tbb-4.4.5/lib/intel64/vc14/tbbmalloc.lib;wsock32.lib;Psapi.lib"
)

# Create imported target TKMath
add_library(TKMath SHARED IMPORTED)

set_target_properties(TKMath PROPERTIES
  INTERFACE_LINK_LIBRARIES "TKernel;D:/SALOME-9.3.0-9.3.0-9.3.0/PRODUCTSD/tbb-4.4.5/lib/intel64/vc14/tbb.lib;D:/SALOME-9.3.0-9.3.0-9.3.0/PRODUCTSD/tbb-4.4.5/lib/intel64/vc14/tbbmalloc.lib"
)

The SALOME_ROOT_DIR is set D:/SALOME-9.3.0. Actually, it has the same error in other places. I need modify them manually after generation each time, find and replace with correct path values in the project setting.

Also, when generating the MOC, CMake will generate files with .cpp_parameters where also have such wierd path names.

Could anybody help me on this issue? Thanks.

Regards,

Leon

Re: About occt dependency generation in CMake

Posted by Leon at April 12. 2021

for example, in *.cpp_parameters, it has lines:


-ID:/SALOME-9.3.0-9.3.0-9.3.0/PRODUCTSD/zlib-1.2.5/include
-ID:/SALOME-9.3.0-9.3.0-9.3.0/PRODUCTSD/python-3.6.0/include
-ID:/SALOME-9.3.0-9.3.0-9.3.0/PRODUCTSD/libxml2-2.9.1/include
-ID:/SALOME-9.3.0-9.3.0-9.3.0/PRODUCTSD/freetype-2.9.0/include
-ID:/SALOME-9.3.0-9.3.0-9.3.0/PRODUCTSD/hdf5-1.10.3/include
-ID:/SALOME-9.3.0-9.3.0-9.3.0/PRODUCTSD/gl2ps-1.4.0-40373129/include

Only happens with these 6 library dependencies.

Powered by Ploneboard
Document Actions