pymoab not recognizing destdir variable

Issue #168 resolved
Luke Labrie-Cleary created an issue

Running

cmake ../$pkgname -DENABLE_HDF5=ON \
                  -DENABLE_NETCDF=ON \
                  -DENABLE_FORTRAN=OFF \
                  -DENABLE_BLASLAPACK=OFF \
                  -DBUILD_SHARED_LIBS=ON \
                  -DENABLE_PYMOAB=ON \
                  -DBUILD_SHARED_LIBS=ON \
                  -DCMAKE_INSTALL_PREFIX=/bar
make

and then

make DESTDIR=/foo install 

will install pymoab to /barand not /foo/bar. Libraries and executables still end up in /foo/bar

Can provide more detail if needed

Comments (7)

  1. Vijay M

    Luke, I thought I pushed a fix. Let me check. Perhaps I didn’t submit a PR or even push to the remote origin.

  2. Vijay M

    Can you test with the new branch I pushed? vijaysm/fix-cmake-destdir-install

    If that works for your workflows, I will submit a PR. I tested with and without DESTDIR to verify installation

  3. Luke Labrie-Cleary reporter

    Hey Vijay, apologies for the delay. I pulled from that commit and it worked.

    I’m not that well-versed in CMake, but the approach looks good to me and I don’t think there is a way to leverage CMake to handle this automatically. For context, I’ve made an AUR version of moab, which uses a fakeroot environment at the install step. So the install prefix available to CMake after the configure & build steps needs to be prepended with the path to the fakeroot root folder in order to install properly. I’m not sure if CMake could reasonably be expected to account for this.

    Thanks for your help!

  4. Log in to comment