[Rtk-users] compilation issues in case of outside of ITK directory build

Simon Rit simon.rit at creatis.insa-lyon.fr
Thu Oct 25 15:59:42 EDT 2018


Hi,
It seems that you are trying to compile against an installed ITK_DIR. This
is no longer possible, see this thread:
https://github.com/SimonRit/RTK/issues/207
Can you try to compile against your build directory (set ITK_DIR to the
build directory)?
Thanks,
Simon

On Thu, Oct 25, 2018 at 5:16 PM Julia Semyakishkina <
prekrasnaya1985 at gmail.com> wrote:

> Hello.
> I can't build RTK in Linux. I've done all default steps described in wiki,
> but on configure i've got:
> CMake Error at utilities/lp_solve/CMakeLists.txt:9 (include):
>    include could not find load file:
>
>      ITKModuleMacros
>
>
> Hm.. it tries include module that exists in src ITK dir, not install...
> I mean
> "ls /usr/local/lib/cmake/ITK-4.13 | grep ITKModuleMacros" prints nothing
> "ls /home/user/src/ITK/CMake | grep ITKModuleMacros" prints
> ITKModuleMacros.cmake
>
> OK, i have just tried to add CMAKE_MODULE_PATH=/home/user/src/ITK/CMake
> and got next error:
>
> CMake Error at CMakeLists.txt:250 (message):
>   Modules can only be built against an ITK build tree; they cannot be built
>   against an ITK install tree.
>
> Let's look at the code:
>
> if(NOT ITK_SOURCE_DIR)
>   if(NOT EXISTS ${ITK_CMAKE_DIR}/ITKModuleMacros.cmake)
>     message(FATAL_ERROR "Modules can only be built against an ITK build
> tree; they cannot be built against an ITK install tree.")
>   endif()
>   list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR})
>   include(ITKModuleExternal)
> else()
>   itk_module_impl()
> endif()
>
> 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 ?
>
> If i set ITK_CMAKE_DIR to /home/user/src/ITK/CMake where ITKModuleMacros
> is, it resets back to ITK installation directory at
> # --------------------------------------------------------
> # Find ITK (required)
> if(NOT ITK_SOURCE_DIR)
>   find_package(ITK 4.12.0 REQUIRED)
> endif()
>
>
> 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.
> _______________________________________________
> Rtk-users mailing list
> Rtk-users at public.kitware.com
> https://public.kitware.com/mailman/listinfo/rtk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/rtk-users/attachments/20181025/8df861eb/attachment.html>


More information about the Rtk-users mailing list