The package mlpack is header only and can be used from CMake via: find_path(MLPACK_INCLUDE_DIRS "mlpack/mlpack.hpp") target_include_directories(main PRIVATE ${MLPACK_INCLUDE_DIRS})