<div dir="ltr">Hello.<br>I can't build RTK in Linux. I've done all default steps described in wiki, but on configure i've got: <br>CMake Error at utilities/lp_solve/CMakeLists.txt:9 (include):<br> include could not find load file:<br><br> ITKModuleMacros<br><br><br>Hm.. it tries include module that exists in src ITK dir, not install...<br>I mean <br>"ls /usr/local/lib/cmake/ITK-4.13 | grep ITKModuleMacros" prints nothing<br>"ls /home/user/src/ITK/CMake | grep ITKModuleMacros" prints ITKModuleMacros.cmake<br><br>OK, i have just tried to add CMAKE_MODULE_PATH=/home/user/src/ITK/CMake and got next error:<br><br>CMake Error at CMakeLists.txt:250 (message):<br> Modules can only be built against an ITK build tree; they cannot be built<br> against an ITK install tree.<br><br>Let's look at the code:<br><br>if(NOT ITK_SOURCE_DIR)<br> if(NOT EXISTS ${ITK_CMAKE_DIR}/ITKModuleMacros.cmake)<br> message(FATAL_ERROR
"Modules can only be built against an ITK build tree; they cannot be
built against an ITK install tree.")<br> endif()<br> list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR})<br> include(ITKModuleExternal)<br>else()<br> itk_module_impl()<br>endif()<br><br>Yea,
ITK_SOURCE_DIR is not set in my case, but why there is must be
ITKModuleMacros.cmake at my ITK_CMAKE_DIR dir that points to ITK
installation dir ?<br><br>If i set ITK_CMAKE_DIR to /home/user/src/ITK/CMake where ITKModuleMacros is, it resets back to ITK installation directory at <br># --------------------------------------------------------<br># Find ITK (required)<br>if(NOT ITK_SOURCE_DIR)<br> find_package(ITK 4.12.0 REQUIRED)<br>endif()<br><br><br>So,
the only way i see is to build inside ITK, but i am not familiar with
this. Could anyone help me how to build RTK inside ITK.</div>