Missing macros in CMake scripts


I started experimenting with CMake and was able to successfully generate and compile OCCT under VS2012.

However, I noticed that using the cmake-gui it is possible only to set the macros:

The macros: HAVE_VIDEOCAPTURE and HAVE_OPENCL cannot be set.

Is this a problem with WOK (skipping the two latter macros when generating CMake files)?

Can the missing macros be set easily somewhere in CMake files and if so where/how (I a newbie regarding CMake).

Thanks for any comment on that.


Andrey BETENEV's picture

Hello Pawel,

These macros are not supported yet by OCCT building procedures:

- HAVE_OPENCL is a new feature just introduced (still in branch); it is work in progress and should be supported in the future versions of OCCT (see issue #24153)

- HAVE_VIDEOCAPTURE enables video capturing on Windows platform only; it was a kind of experimental feature not fully supported because of low demand. I deem you can easily enable it in properties of VS project (or make file) for TKOpenGl.


Pawel's picture

Hello Andrey,

thanks for clarifying!

I came across another little issue with the CMake Build. I would appreciate a comment ;)

I build on VS2012 x64. Configuring CMake and compilation went OK. The only thing was that for the Debug Build CMake does not differentiate between the release and debug versions of TBB and so the INSTALL project copies always the TBB release binaries (e.g. tbb.dll instead of tbb_debug.dll).

It is not a problem to change it manually but my original expectation was that changing the BUILD_TYPE in CMake from 'Release' to 'Debug' would take care of that.

So is it a bug or a feature ;)

Andrey BETENEV's picture

Hello Pawel,

Sorry for late reply -- the issue you describe looks like a bug, please register it in Mantis for us to check.