rules_foreign_cc
rules_foreign_cc copied to clipboard
cmake not support $(execpath //foo:bar)?
I defined a cache_entries: "MYSQL_INCLUDE_DIR": "$(locations @mysqlclient)" + "/include", but $(locations @mysqlclient) is empty, so it's cmake not support make variables? or just cannot used in cache_entries or way I used not correct?
I just had the same problem trying to reference a file in copts. AFAIK the rules need to be updated to support it.
I had to use the ${EXT_BUILD_ROOT} variable to get the correct path.
copts = [
'-DMY_VAR="${EXT_BUILD_ROOT}/my_path/my_file.h"',
]
This feels quite ugly, and if your project can be imported by others then it won't work because the path will contain external/your_dep_name/....