The package matajoh-libnpy provides CMake targets: find_package(npy CONFIG REQUIRED) target_link_libraries(main PRIVATE npy::npy)