<html><head></head><body><div>I forgot to mention - building it this way doesn't require the use of a toolchain file - it was in response to this:</div><div><br></div><div>> <b>Trying to do so because building CMake without toolchain gives me the below; After I move cmake.exe to another directory:</b></div><div><b><br></b></div><div></div><div>If you build it as I laid out below, you won't need a toolchain file. Hope this helps!</div><div><br></div><div>Kyle</div><div><br></div><div><br></div><div>On Thu, 2019-01-24 at 12:09 -0500, Kyle Edwards wrote:</div><blockquote type="cite"><div>Venedict,</div><div><br></div><div>To relocate cmake.exe, it's not sufficient to just copy the executable - you have to install all of the modules along with it. You do this by running the "install" target.</div><div><br></div><div>Given a path to where you want to put CMake, you would build it like this:</div><div><br></div><div>cmake C:/Path/To/CMake/Source -DCMAKE_INSTALL_PREFIX=C:/Path/To/Where/I/Want/To/Install</div><div>cmake --build .</div><div>cmake --build . --target install</div><div><br></div><div>This will install cmake.exe along with all of its dependencies.</div><div><br></div><div>Kyle</div><div><br></div><div>On Thu, 2019-01-24 at 08:42 -0800, Venedict Tchistopolskii wrote:</div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hey there!<br><br></div><b>Current toolchain file for compiling CMake using CMake (on WIndows):</b><br>SET(CMAKE_SYSTEM_NAME Windows)<br>set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)<br>set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)<br>set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)<br>set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)<br>set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)<br><br></div><div><b>Unfortunately this konks out with:</b><br>CMake Error: The following variables are used in this project, but they are set to NOTFOUND.<br>Please set them or make sure they are set and tested correctly in the CMake files:<br>LIBMD_LIBRARY<br>    linked by target "cmTC_356fd" in directory D:/GitHub/custom_cmake/solutions_cmake/CMakeFiles/CMakeTmp<br><br></div><div><b>Trying to do so because building CMake without toolchain gives me the below; After I move cmake.exe to another directory:</b><br>CMake Error: Could not find CMAKE_ROOT !!!<br>CMake has most likely not been installed correctly.<br>Modules directory not found in<br><br>Usage<br><br>  cmake [options] <path-to-source><br>  cmake [options] <path-to-existing-build><br>  cmake [options] -S <path-to-source> -B <path-to-build><br><br>Specify a source directory to (re-)generate a build system for it in the<br>current working directory.  Specify an existing build directory to<br>re-generate its build system.<br><br>Run 'cmake --help' for more information.<br><br></div><div><b>Please advise!!<br><br></b></div><div><b>VT<br></b></div><div><br><br></div></div></div></div>
<pre>-- 

Powered by <a href="http://www.kitware.com">www.kitware.com</a>

Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: <a href="http://cmake.org/cmake/help/support.html">http://cmake.org/cmake/help/support.html</a>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html">http://cmake.org/cmake/help/consulting.html</a>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html">http://cmake.org/cmake/help/training.html</a>

Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Follow this link to subscribe/unsubscribe:
<a href="https://cmake.org/mailman/listinfo/cmake-developers">https://cmake.org/mailman/listinfo/cmake-developers</a>
</pre></blockquote></blockquote></body></html>