boostorg / boostorg/gil

Define CMake target Boost::gil in CMakeLists.txt

未关闭
#167 5 条评论 1 个 reaction 已指派 1 人 已被 @mloskot 认领 在 GitHub 查看
config/cmake status/need-feedback status/work-in-progress
主要语言
C++
星标
199
派生
171
平均合并
1 天 14 小时
30 天内合并 PR
10

描述

Could you please add a (interface library) cmake target for gil, that specifies the include directory and dependencies.

E.g something like:

add_library(boost_gil INTERFACE)
target_include_directories(boost_gil INTERFACE include)
target_compile_options(boost_gil INTERFACE include ...)
add_library(Boost::gil ALIAS boost_gil)

target_link_libraries(boost_gil INTERFACE
Boost::filesystem
Boost::boost
JPEG::JPEG
PNG::PNG
TIFF::TIFF
)

Cmake targets depending on Boost.Gil (like your examples and test, or a user progam doing a `add_subdirectory(libs/gil)`) could then just use `target_link_libraries( my_exec Boost::gil)` and automatically get all the relevant information like include directory, transitive dependencies and any required compilation flags.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。