You need to tell eigen where to install, probably as an argument to its configure step. If it builds with CMake, you can use:
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> as one of the CMake args. If it has a non-CMake configure step, you'll have to call that and pass in <INSTALL_DIR> as an argument. HTH, David C. On Thursday, April 9, 2015, Cedric Doucet <cedric.dou...@inria.fr> wrote: > > Hello! > > I try to download, extract, configure, build and install a library with > CMake. > My CMakeLists.txt contains the following lines: > > cmake_minimum_required (VERSION 2.6) > project (example CXX) > set(CMAKE_VERBOSE_MAKEFILE ON) > include(ExternalProject) > include(ProcessorCount) > ProcessorCount(N) > if(NOT N EQUAL 0) > set(CMAKE_BUILD_FLAGS -j${N}) > endif() > ExternalProject_Add(eigen > PREFIX third_party > DOWNLOAD_DIR third_party/eigen/download > SOURCE_DIR third_party/eigen/src > BINARY_DIR third_party/eigen/build > INSTALL_DIR third_party/eigen/install > DOWNLOAD_COMMAND wget > http://bitbucket.org/eigen/eigen/get/3.2.4.tar.gz && tar xvzf > 3.2.4.tar.gz -C ../src --strip-components=1 > ) > > In this example, the installation step fails with the following error > message: > > CMake Error at cmake_install.cmake:38 (FILE): > file cannot create directory: /usr/local/include/eigen3. Maybe need > administrative privileges. > > It means that the value of INSTALL_DIR is not taken into account during > the configuration process. > > Why? What am I do wrong? > > Thank you very much for your help. > > Best regards, > > Cédric Doucet > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/cmake >
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake