Recommended way to use precompiled libs with CMAKE?

Hello All,

i started a OCC project on Linux using Quaoar's Workshop No 5 as guideline,
which works fine.

Now I'd like to compile also on Windows using the precompiled libraries.

I added
set (OpenCASCADE_DIR "C:/OpenCASCADE-7.6.0-vc14-64/opencascade-7.6.0")
include_directories("C:/OpenCASCADE-7.6.0-vc14-64/opencascade-7.6.0/inc")
to the cmake file, but still get messages like below.

What is the correct way to add a reference from my CMAKE file to the procompiled libs ?

Thanks, Carsten

Make Error at C:/OpenCASCADE-7.6.0-vc14-64/opencascade-7.6.0/OpenCASCADEConfig.cmake:14 (include):
include could not find requested file:

C:/Users/cz/CLionProjects/OCXReader/adm/cmake/occt_macros.cmake
Call Stack (most recent call first):
C:/OpenCASCADE-7.6.0-vc14-64/opencascade-7.6.0/OpenCASCADEConfig.cmake:47 (OCCT_INCLUDE_CMAKE_FILE)
CMakeLists.txt:10 (find_package)

CMake Error at C:/OpenCASCADE-7.6.0-vc14-64/opencascade-7.6.0/OpenCASCADEConfig.cmake:53 (OCC_VERSION):
Unknown CMake command "OCC_VERSION".

Minhua Chen's picture

Run cmake in C:/OpenCASCADE-7.6.0-vc14-64/opencascade-7.6.0/
cmake -G "Visual Studio 14 2015" -A x64 .
It works for me