khamake icon indicating copy to clipboard operation
khamake copied to clipboard

A library's full path is used for addDefine

Open MoritzBrueckner opened this issue 5 years ago • 0 comments

When adding a library in the Khafile like this:

project.addLibrary("D:/dev/armsdk/armory");

The hxml define looks like this:

-D D:/dev/armsdk/armory

instead of this:

-D armory

This is especially problematic when the Khafile uses absolute paths and is automatically generated like Armory does it. The flag will likely be different on different machines so there is no way to use it properly in the code.

https://github.com/Kode/khamake/blob/25a96e968803b9147f16abd6a403e693c68f6fa7/src/Project.ts#L207-L208

Link with https://github.com/armory3d/armory/pull/1858#issuecomment-691637841

MoritzBrueckner avatar Sep 13 '20 12:09 MoritzBrueckner