Compilation with Open CASCADE Technology on Windows
I've found that CMake machinery might be slightly improved to extend support of Visual Studio builds. The following issues are found:
- Hints for Open CASCADE Technology libraries should be extended, like this
else()
set(OCC_LIBS)
foreach(OCC ${OCC_LIBS_REQUIRED})
find_library(OCC_LIB ${OCC} HINTS ENV CASROOT PATH_SUFFIXES
lib ${OCC_SYS_NAME}/lib ${OCC_SYS_NAME}/vc8/lib
${OCC_SYS_NAME}/vc10/lib ${OCC_SYS_NAME}/vc11/lib
${OCC_SYS_NAME}/vc12/lib ${OCC_SYS_NAME}/vc14/lib
${OCC_SYS_NAME}/gcc/lib ${OCC_SYS_NAME}/gcc/bin)
- Modern Open CASCADE Technology does not use outdated WNT and OCC_CONVERT_SIGNALS for Visual Studio builds:
if(WIN32)
list(APPEND EXTERNAL_LIBRARIES "winspool")
add_definitions(-DOCC_CONVERT_SIGNALS)
elseif(MSVC)
add_definitions(-DWNT)
endif()
- The "_OCC64" flag is not used:
if(HAVE_64BIT_SIZE_T)
add_definitions(-D_OCC64)
endif()
Edited by Alexander Malyshev