Please see the image below for the error I’m facing.
What is the content of ITKDoubleConversion.cmake
?
And what are you trying to do? Configure your own project by pointing it at ITK in vcpkg
or something else?
Also, in the future please copy-paste the text using preformatted text instead of a screenshot. Text can be searched and copy-pasted easily.
CMake Error at /home/devops/PackageManager/vcpkg/installed/x64-linux/share/itk/Modules/ITKDoubleConversion.cmake:1:
Parse error. Expected a newline, got identifier with text "set".
Call Stack (most recent call first):
/home/devops/PackageManager/vcpkg/installed/x64-linux/share/itk/ITKModuleAPI.cmake:76 (include)
/home/devops/PackageManager/vcpkg/installed/x64-linux/share/itk/ITKModuleAPI.cmake:31 (itk_module_load)
/home/devops/PackageManager/vcpkg/installed/x64-linux/share/itk/ITKModuleAPI.cmake:129 (_itk_module_config_recurse)
/home/devops/PackageManager/vcpkg/installed/x64-linux/share/itk/ITKConfig.cmake:81 (itk_module_config)
/home/devops/PackageManager/vcpkg/scripts/buildsystems/vcpkg.cmake:788 (_find_package)
CMakeLists.txt:5 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/devops/Example/circle/build/CMakeFiles/CMakeOutput.log".`Preformatted text`
While trying to configure an itk example using vcpkg, I’m getting this error in Linux.
get_filename_component(VCPKG_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)set(ITKDoubleConversion_LOADED 1)
set(ITKDoubleConversion_ENABLE_SHARED "0")
set(ITKDoubleConversion_DEPENDS "")
set(ITKDoubleConversion_PUBLIC_DEPENDS "")
set(ITKDoubleConversion_TRANSITIVE_DEPENDS "")
set(ITKDoubleConversion_PRIVATE_DEPENDS "")
set(ITKDoubleConversion_LIBRARIES "optimized;${VCPKG_IMPORT_PREFIX}/lib/libdouble-conversion.a;debug;${VCPKG_IMPORT_PREFIX}/debug/lib/libdouble-conversion.a")
set(ITKDoubleConversion_INCLUDE_DIRS "${ITK_INSTALL_PREFIX}/include/ITK-5.1")
set(ITKDoubleConversion_LIBRARY_DIRS "")
set(ITKDoubleConversion_RUNTIME_LIBRARY_DIRS "${ITK_INSTALL_PREFIX}/lib")
set(ITKDoubleConversion_TARGETS_FILE "")
set(ITKDoubleConversion_FACTORY_NAMES "")
It is the content of ITKDoubleConversion.cmake
Something went wrong when generating ITKDoubleConversion.cmake
. There should have been a new line before the second command in the first line (set(ITKDoubleConversion_LOADED 1
). This is one of my local ITKDoubleConversion.cmake
:
set(ITKDoubleConversion_LOADED 1)
set(ITKDoubleConversion_ENABLE_SHARED "0")
set(ITKDoubleConversion_DEPENDS "")
set(ITKDoubleConversion_PUBLIC_DEPENDS "")
set(ITKDoubleConversion_TRANSITIVE_DEPENDS "")
set(ITKDoubleConversion_PRIVATE_DEPENDS "")
set(ITKDoubleConversion_LIBRARIES "itkdouble-conversion")
set(ITKDoubleConversion_INCLUDE_DIRS "C:/Dev/ITK-git/Modules/ThirdParty/DoubleConversion/src;C:/Dev/ITK-vs19/Modules/ThirdParty/DoubleConversion/src/double-conversion")
set(ITKDoubleConversion_LIBRARY_DIRS "")
set(ITKDoubleConversion_RUNTIME_LIBRARY_DIRS "C:/Dev/ITK-vs19/bin")
set(ITKDoubleConversion_TARGETS_FILE "")
set(ITKDoubleConversion_FACTORY_NAMES "")
I guess vcpkg
's port of ITK is the source of the problem.
First, try updating vcpkg, then update the ports. If that does not resolve the problem, submit an issue at vcpkg, as this one is not listed yet.
Thank you for the reply.
It worked when I changed this ‘ITKDoubleConversion.cmake’ file.