[mlpack-git] [mlpack] Cannot find_package(mlpack) via cmake (#444)

John Gehman notifications at github.com
Wed Jul 1 04:00:12 EDT 2015


I have successfully installed mlpack-1.0.12 and run the allknn sample.

In an attempt to start using mlpack for my own projects, I have copied hmm_train.cpp out of the package and into a separate location, and attempted to build an executable with just it using cmake. Make CMakeLists.txt file is:

cmake_minimum_required(VERSION 3.2)
project(HMM)

set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wall -std=c++0x")
find_package(mlpack)
add_executable(hmm_train hmm_train_main.cpp)

The find_package line is all I've ever had to do to include, for example, armadillo, and seeing as how mlpack itself uses cmake, I wouldn't think I would have to go to any extraordinary effort to use mlpack in my projects using cmake.  I wonder whether something has been left out of the install sequence, as using this cmake with this file, I get:

By not providing "Findmlpack.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "mlpack", but
  CMake did not find one.

  Could not find a package configuration file provided by "mlpack" with any
  of the following names:

    mlpackConfig.cmake
    mlpack-config.cmake

  Add the installation prefix of "mlpack" to CMAKE_PREFIX_PATH or set
  "mlpack_DIR" to a directory containing one of the above files.  If "mlpack"
  provides a separate development package or SDK, be sure it has been
  installed.



---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/444
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20150701/8a0535ea/attachment.html>


More information about the mlpack-git mailing list