-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem using ITKElastix in another ITK remote module #86
Comments
Initial and incremental builds seem to behave differently. The only idea I have is to rename ITKElastix from |
I am not following the issue. What is the issue, and how does the proposed change help?
We may be able to avoid this be specifying the Line 33 in 532a3fe
https://github.com/SuperElastix/elastix/blob/90122eff6b37a17adc9f5bb3d7bc08608e9c14a6/CMakeLists.txt#L26 |
Now I see what is the problem: there is a true circular dependency. Elastix depends on ITK, and if ITK tries to depend on it via a remote module, the circle of dependence is complete. Just specifying components does not help, because One way to resolve this is for HASI to not be an ITK remote module, and just be an application which depends on ITK and Elastix (not good). Maybe another is for Elastix to have its own separate build of ITK (bad). The last is to merge ITKElastix into Elastix, so Elastix can behave as a remote module when being built as part of ITK (requires cooperation of Elastix maintainers). |
Right - if |
Specifying components indeed resolves circular dependency when building ITK. But the link error
|
Great! Does the ElastixTargets.cmake file have the Is ElastixTarget.cmake getting sourced in the configuration? |
ElastixTargets.cmake does have # Import target "elastix_lib" for configuration "Debug"
set_property(TARGET elastix_lib APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(elastix_lib PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
IMPORTED_LOCATION_DEBUG "C:/Dev/ITK-git-2015/lib/Debug/elastix-5.0.lib"
) ElastixConfig.cmake has this line: set(Elastix_LOADED 1)
set(Elastix_ENABLE_SHARED "0")
set(Elastix_DEPENDS "ITKCommon;ITKIOImageBase;ITKImageGrid;ITKImageSources;ITKSmoothing")
set(Elastix_PUBLIC_DEPENDS "ITKCommon;ITKIOImageBase;ITKImageGrid;ITKSmoothing")
set(Elastix_TRANSITIVE_DEPENDS "ITKCommon;ITKIOImageBase;ITKImageGrid;ITKImageSources;ITKSmoothing")
set(Elastix_PRIVATE_DEPENDS "")
set(Elastix_LIBRARIES "elastix_lib;transformix_lib")
set(Elastix_INCLUDE_DIRS "")
set(Elastix_LIBRARY_DIRS "")
set(Elastix_RUNTIME_LIBRARY_DIRS "C:/Dev/ITK-git-2015/bin")
set(Elastix_TARGETS_FILE "")
set(Elastix_FACTORY_NAMES "")
set(Elastix_DIR "C:/Dev/ITK-git-2015/_deps/elx-build")
find_package(Elastix REQUIRED) |
If I manually change |
Yes The route should be:
Can we patch elastix/ElastixConfig.cmake.in to address this? |
My attempt dzenanz@9f21804 does not work. How would modifying |
Uncommenting Line 64 in 2f5987f
|
The change needs to be made in upstream |
CMake Error at C:/Dev/ITK-git-2015/_deps/elx-build/ElastixConfig.cmake:19 (include):
was generated by the export() command. It may not be used as the argument Call Stack (most recent call first): |
Update: we have a version of the involved software which compiles. I will follow up (this week or next) in respective repositories. |
Has this been addressed? |
Partly addressed, partly abandoned. |
I am trying to use ITKElastix from HASI. To accomplish this, I am adding ITKElastix as a remote module to ITK. ITK builds fine, but HASI runs into link errors (cannot find
elastix_lib.lib
). In an attempt to fix this, I tried adding CMake export code to ITKElastix, but this causes circular dependency oftransformix_lib
andelastix_lib
when trying to generate ITK project from CMake:The text was updated successfully, but these errors were encountered: