microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.81k stars 6.3k forks source link

[OpenCL] CMake wrapper needs correction #11313

Open Neumann-A opened 4 years ago

Neumann-A commented 4 years ago

Issue: CMake's findOpenCL does not correctly take care fof release/debug libraries. As such the wrapper already installed by vcpkg needs additional logic to take care that the target consists of both release and debug information. The same need to be applied to the _LIBRARIES variable.

Is your feature request related to a problem? Please describe. Incomplete target information in INTERFACE_LINK_LIBRARIES in the targets generated by ITK

Proposed solution Add the Information to the _LIBRARIES variable via selectLibraryconfigurations and also add the info to the OpenCL imported target

Describe alternatives you've considered there is not alternativ to make it correctly work.

Neumann-A commented 4 years ago

Also needs to link OneCoreUAP.lib on Windows 10 in static builds

dg0yt commented 1 month ago

Also needs to link OneCoreUAP.lib on Windows 10 in static builds

Fixed by https://github.com/microsoft/vcpkg/pull/31637.

CMake's findOpenCL does not correctly take care of release/debug libraries. As such the wrapper already installed by vcpkg needs additional logic to take care that the target consists of both release and debug information. The same need to be applied to the _LIBRARIES variable.

Mitigation: #40042 makes the port install upstream's CMake config.