Rather than providing a target, some libraries like LibRaw
generate variables that contain information about include paths, library paths and compile definitions. In the case of LibRaw
, vcpkg recommends the following usage:
target_compile_definitions(main PRIVATE ${LibRaw_DEFINITIONS})
target_include_directories(main PRIVATE ${LibRaw_INCLUDE_DIR})
target_link_libraries(main PRIVATE ${LibRaw_LIBRARIES})
However, I would much rather stay consistent on linking libraries using
target_link_libraries(main PRIVATE LibRaw)
Is there a way to wrap all of the provided variables into a target.