The package sdl2pp provides CMake variables: find_package(SDL2PP REQUIRED) target_include_directories(main PRIVATE ${SDL2PP_INCLUDE_DIRS}) target_link_libraries(main PRIVATE ${SDL2PP_LIBRARIES})