MarkSchofield / WindowsCMake

CMake-scripts for Windows-specific build tasks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MIDL support is broken - system IDL files aren't found

MarkSchofield opened this issue · comments

MIDL support is broken. Attempting to MIDL compile fails, because it can't find the SDK-provided IDL files. Error messages are (for example):

midl : command line error MIDL1001 : cannot open input file oaidl.idl

It looks like WindowsToolchain/#69 broke things. The specified change switched from setting the system include directories through include_directories(SYSTEM ...) to setting the CMAKE_${LANG}_STANDARD_INCLUDE_DIRECTORIES properties. As a result, when midl.exe runs, it's no longer getting the system include directories passed in. Passing in the CMAKE_C_STANDARD_INCLUDE_DIRECTORIES seems like an appropriate fix.

Fixed with #4.