Как добавить стороннюю (C++) зависимость в файл BUCK?
Я строю свой проект с Баком. Как я могу добавить внешние (не Buck) библиотеки в проект?
Мой пример БАК:
cxx_binary(
name="my_project",
srcs=[
"my_file.cpp",
],
deps=[
"boost_system",
"boost_filesystem",
],
compiler_flags=['-w',
'-Ddef',
'-Ipath',
])
Но есть ошибка: BUILD FAILED: //my_proj:my_project: параметр 'deps': невозможно принудительно установить 'boost_system' к классу com.facebook.buck.model.BuildTarget
1 ответ
Используйте prebuilt_cxx_library:
prebuilt_cxx_library(
name="boost_system",
lib_dir='../otherlibs'
)
prebuilt_cxx_library(
name="boost_filesystem",
lib_dir='../otherlibs'
)
а также
........
deps=[
":boost_system",
":boost_filesystem",
],
.......