Importing OCCT libraries using CMake in CLion23.1 linking issue

Hello all,

I have been trying to setup occt using a simple project in CLion IDE, while building the CMakeLists.txt file I keep running into an issue where the build was failing due to undefined definition errors, I have made sure that the libraries are properly linked and the include directories are correct, but none of that worked. I also tried using the precompiled binaries as well as vcpkg installed version, both of which had the same issue.

Here is the CMakeLists:

cmake_minimum_required(VERSION 3.25)
project(proto_concept)

set(CMAKE_CXX_STANDARD 14)

find_package(OpenCASCADE CONFIG REQUIRED)


include_directories(${OpenCASCADE_INCLUDE_DIR})

add_executable(proto_concept occt-demo/src/models/main.cpp)

target_link_directories(proto_concept PUBLIC cmake-build-debug/vcpkg_installed/x64-windows/lib/)


target_link_libraries(proto_concept PRIVATE ${OpenCASCADE_LIBRARIES})

set(OpenCASCADE_DLL_PATH "${OpenCASCADE_BINARY_DIR}" CACHE PATH "OpenCASCADE DLL path")

set_property(TARGET proto_concept PROPERTY VS_DEBUGGER_ENVIRONMENT "PATH=$<$<CONFIG:DEBUG>:${OpenCASCADE_BINARY_DIR}d>$<$<NOT:$<CONFIG:DEBUG>>:${OpenCASCADE_BINARY_DIR}>;%PATH%")

I also attached the build logs. Tried OCCT v7.7.0 and v7.6.2.

Any support is appreciated.

Attachments: