[CMake] ExternalProject_Add not honoring the INSTALL_DIR argument.

Michael Jackson mike.jackson at bluequartz.net
Mon Aug 29 11:52:38 EDT 2016


I have the following CMake file:

set(QHull_GIT_REPO "git://github.com/qhull/qhull")
set(QHull_GIT_TAG "")
set(QHull_INSTALL_NAME "qhull")
set(QHull_INSTALL_NAME "qhull-2015.2")


ExternalProject_Add(${QHull_INSTALL_NAME}
   PREFIX ${Fusion_SDK_ROOT}
   URL "http://www.qhull.org/download/qhull-2015-src-7.2.0.tgz"
   INSTALL_DIR=/tmp/Fusion/qhull-2015.2
     LOG_DOWNLOAD 1
     LOG_UPDATE 1
     LOG_CONFIGURE 1
     LOG_BUILD 1
     LOG_INSTALL 1

)

  and when I invoke the initial cmake with this:

  cmake -G Ninja -DBUILD_SHARED_LIBS=ON  -DCMAKE_BUILD_TYPE=Release 
-DFusion_SDK_ROOT=/tmp/Fusion_SDK ../

I get a valid "configure" step. Then I run "ninja" and I get errors on 
installation. The errors are because CMake is attempting to install 
QHull in /usr/local/lib.

Why is that? I am not sure what I am doing wrong as this seems like a 
pretty trivial case. I have cmake 3.5.1 and read the docs at 
https://cmake.org/cmake/help/v3.5/module/ExternalProject.html but 
somehow cmake is messing up.

Thoughts?


-- 
Michael A. Jackson
BlueQuartz Software, LLC
[e]: mike.jackson at bluequartz.net


More information about the CMake mailing list