wgois / OIS

Official OIS repository. Object oriented Input System

Home Page:https://wgois.github.io/OIS/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't configure project with CMAKE [DirectX SDK error]

lapinott opened this issue · comments

CMAKE says it can't find the DirectX SDK - I am using windows 10 and the SDK is supposedly already a part of Windows or am I wrong?

CMAKE output:

Selecting Windows SDK version 10.0.17134.0 to target Windows 10.0.16299.
The C compiler identification is MSVC 19.14.26428.1
The CXX compiler identification is MSVC 19.14.26428.1
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x86/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x86/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x86/cl.exe
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x86/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
CMake Error at CMakeLists.txt:68 (MESSAGE):
  Could not locate DirectX SDK on this system


Configuring incomplete, errors occurred!
See also "C:/Users/Julien/source/repos/NYNE/OGRE/OIS-build/CMakeFiles/CMakeOutput.log".

This is strange. Can you check if you have the Windows SDK installed?

If so, you should see stuff in the C:\Program Files (x86)\Windows Kits\10\bin directory, with the version that are installed.

Alternatively, you can download a standalone DirectX SDK from Microsoft here, it does actually work on Windows 10, and install the correct libraries where the FindDirectX CMake script expect them to be:

https://www.microsoft.com/en-us/download/details.aspx?id=6812

You need torelaunch CMake GUI if you use it after installing one of these, because they change some environment variable during the process.

This is strange. Can you check if you have the Windows SDK installed?

If so, you should see stuff in the C:\Program Files (x86)\Windows Kits\10\bin directory, with the version that are installed.

Yes I have all the necessary files in there. It just seem to me the CMAKE process is too stupid to figure out where to look ? I have all the binaries in there (C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0), for arm, arm64, x64, x86.

It seems to be able to find the SDK installed by the thing I liked to you. I agree that this is strange. I need to dig a bit deeper into DirectX.

Can you please try installing the file linked in my last message? It shouldn't interfere with anything that was automatically installed by Visual Studio as it does it in a different folder.

1.4 Release:
1>d:\jumat\downloads\ois-1.4\ois-1.4\includes\win32\win32keyboard.h(54): error C4716: 'OIS::Win32Keyboard::getAsKeyCode' : doit retourner une valeur

Will try from latest commit.

OK here is what I had to do.

First download OIS not from releases but from latest commit.

On Windows 10 the path to DXSDK has a different pattern. On my system the full path is (for x64 libs)

D:\Windows Kits\10\Lib\10.0.17134.0\um\x64

I modified the CMakeLists.txt line 142 to

target_link_libraries(OIS "${DXSDK_DIR}/um/${DIRECTX_ARCH}/dinput8.lib" "${DXSDK_DIR}/um/${DIRECTX_ARCH}/dxguid.lib")

So for a CMAKE run you would put D:\Windows Kits\10\Lib\10.0.17134.0 as DXSDK_DIR.

Just another minor inconvenience: when building the INSTALL target for debug and release, the release dll will overwrite the debug one (same name).

Hope it helps.