The package openimageio provides CMake targets: find_package(OpenImageIO CONFIG REQUIRED) target_link_libraries(main PRIVATE OpenImageIO::OpenImageIO)