premake/premake-core

`os.findheader()` broken on macOS

開放

#873 建立於 2017年8月10日

 (10 則留言) (0 個反應) (0 位負責人)C (651 個分叉)auto 404
bugenhancementhelp wanted

倉庫指標

星標
 (3,621 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Opening an issue for this, as I'm not sure the best way to address it.

The current logic for building the include file search path on macOS results in Posix looking set of directories like /include:/usr/include:/usr/local/include.

On a typical macOS developer installation, the system headers will actually be installed to a path like /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/. If targeting iOS, the header would be in a directory like /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/. The same for watchOS or tvOS.

It is not enough to identify the current system; the call must also know the target system to evaluate this call correctly.

貢獻者指南