[CMake] cmake prebuilt binaries won't work if bin folder is renamed.

Vinitha jiji.vinitha at gmail.com
Wed Sep 5 02:47:26 EDT 2018


 Hi,
I have downloaded cmake binaries from cmake website. As I had to keep cmake
binaries for different platforms in specific folder as per my build system
requirements, I have renamed the 'bin' folder to for eg. lin, win, mac etc.
This seems to work fine till cmake version 3.7. From this version onwards,
I get the following error while invoking cmake after renaming the bin
folder.

*$pwd*
*/home/neo/cmake/cmake-3.10.2-Linux-x86_64/lin86*
*$   *
*$./cmake --version*
*CMake Error: Could not find CMAKE_ROOT !!!*

*CMake has most likely not been installed correctly.*
*Modules directory not found in*

*cmake version 3.10.2*

*CMake suite maintained and supported by Kitware (kitware.com/cmake
<http://kitware.com/cmake>).*


If I am renaming back to bin directory, there is no issues observed.
I have observed that, from version 3.7 onwards cmake has a new configure
flag introduced to specify bin directory name, *--bindir=DIR*.

So now if I want to use any other name for 'bin' dir, I need to configure
and build the cmake while specifiying the bin directory name I need.

Is there a way by using any environment variable or something I can modify
the bin directory name of the downloaded cmake binary from cmake website
and use it without the above mentioned error ?


Regards,

Vinitha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180905/7fe14935/attachment.html>


More information about the CMake mailing list