Kode / khamake

Kha's build tool.
http://kha.tech
15 stars 43 forks source link

A library's full path is used for addDefine #232

Open MoritzBrueckner opened 4 years ago

MoritzBrueckner commented 4 years ago

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