-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[vtk-dicom] Fix cmake path #12839
[vtk-dicom] Fix cmake path #12839
Conversation
@@ -32,7 +32,7 @@ vcpkg_configure_cmake( | |||
) | |||
|
|||
vcpkg_install_cmake() | |||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) | |||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/vtk TARGET_PATH share/DICOM) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not the right fix. Could it be that the correct find_package
call is find_package(VTK COMPONENTS DICOM)
. Also the port vtk-dicom
is up for removal since it is planned to be integrated into VTK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the output packages:
vtk-dicom:/share/DICOM/DICOM-targets-debug.cmake
vtk-dicom:/share/DICOM/DICOM-targets-release.cmake
vtk-dicom:/share/DICOM/DICOM-targets.cmake
vtk-dicom:/share/DICOM/DICOM-vtk-module-properties.cmake
vtk-dicom:/share/dicom-0.8/Copyright.txt
vtk-dicom:/share/vtk-dicom/copyright
vtk-dicom:/share/vtk-dicom/vcpkg_abi_info.txt
it doesn't look like there is a DICOM-config.cmake
, so find_package()
won't work. Maybe we need to generate a DICOM/DICOM-config.cmake
or maybe we need to use TARGET_PATH share/vtk
. Given that the original path is lib/cmake/vtk
, I think that TARGET_PATH share/vtk
is probably correct and we need to add a usage file for find_package(VTK COMPONENTS DICOM)
.
@ras0219 @ras0219-msft I think what @Neumann-A said is very reasonable, the correct way is to add a usage to inform users how to use this port. |
According to the official docs, the usage does not work:
It seems that cmake does not provide |
I can't include vtk-dicom in my project using neither: find_package(DICOM QUIET)
if(DICOM_FOUND)
include(${DICOM_USE_FILE})
endif()
set(VTK_DICOM_LIBRARIES vtkDICOM) nor : #recommended usage by vcpkg when installation finished
find_package(vtk CONFIG REQUIRED)
target_link_libraries(main PRIVATE VTK::DICOM) Could you please point out a reasonable way to include vtk-dicom library? |
@dgobbi Could you please take a look? Thanks. |
@JackBoosY right now vtk-dicom only creates "DICOMConfig.cmake" when built with VTK 8. I will fix it so that it creates one with VTK 9, but it will be a few days before I have time to do so. |
@dgobbi once your PR merged, I will close this PR. |
Found a temporary solution: |
Temporary close this PR, will continue this work in the future. |
This seems to be still an issue unless I am doing something wrong. |
Can someone please attempt to fix this bug or get the vtk-dicom module to work inside the vtk port? I tried enabling the module but it fails because a file is overwritten in the download of the external module. I could not figure out how to get around that error. Every time I build vtk I need to do the steps that @QiuKejian mentioned above which does work but is a bit of manual work. |
@dgobbi Any progress? |
I've added |
Will continue this PR in the next week. |
Fixes #12813.