Skip to content

installing opengl with newer Windows SDK #99

@GeertVL-zz

Description

@GeertVL-zz

When I try to do the following:

vcpkg install opengl

I get the following error:

-- CURRENT_INSTALLED_DIR=C:/works/vcpkg/installed/x86-windows
-- DOWNLOADS=C:/works/vcpkg/downloads
-- CURRENT_PACKAGES_DIR=C:/works/vcpkg/packages/opengl_x86-windows
-- CURRENT_BUILDTREES_DIR=C:/works/vcpkg/buildtrees/opengl
-- CURRENT_PORT_DIR=C:/works/vcpkg/ports/opengl/.
CMake Error at ports/opengl/portfile.cmake:6 (message):
  Cannot find Windows 10.0.10240.0 SDK.  File does not exist: C:\Program
  Files (x86)\Windows Kits\10\Lib\10.0.10240.0\um\x86\OpenGL32.Lib
Call Stack (most recent call first):
  scripts/ports.cmake:96 (include)

The SDK for that build number of Windows 10 is not installed. But for 10.0.14393.0 and 10.0.10586.0 it is installed.

We could fix it by changing ofcourse the version number in CMake but that does not help other users that did not install the later versions of the Windows SDK.

There is a function get_os_version_string() that detects the build number in metrics.cpp that we could use in the build_internal() function in commands_installation.cpp. So if we call the get_os_version_string() there. Extract the buildnumber and give it with the command formatting as an extra parameter -DBUILD_NUMBER. We could change the cmake and so it detects the proper SDK.

Is that ok that I fix it and make a pull request for that? Or do you see an other solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:port-bugThe issue is with a library, which is something the port should already support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions