Skip to content

Cmake cannot find OpenCL for HelloOpenCL.exe using vcpkg #29

@Tyler799

Description

@Tyler799

I am trying to follow the getting-started guide here: https://github.com/KhronosGroup/OpenCL-Guide/blob/main/chapters/getting_started_windows.md

If I run the following command:

cmake -A x64 -S . -B .\build -D CMAKE_TOOLCHAIN_FILE=C:\src\vcpkg\scripts\buildsystems\vcpkg.cmake

(Couldn't use <VCPKGROOT because I don't know how to set that variable, the variable editor in Windows apparently isn't enough)

Then it still fails with the following error:

CMake Error at C:/src/vcpkg/installed/x64-windows/share/opencl/vcpkg-cmake-wrapper.cmake:1 (_find_package):
  Could not find a package configuration file provided by "OpenCL" with any
  of the following names:

    OpenCLConfig.cmake
    opencl-config.cmake

Those files don't exist anywhere on my system, I'm assuming because I installed openCL using vcpkg.

FindOpenCL's page is quite sparse. Is there some kind of "hint" that I can use to tell it that it's really under C:\src\vcpkg\installed\x64-windows\bin\OpenCL.dll? I thought using vcpkg was supposed to eliminate this problem...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions