Hi, I am new to ITK. I am trying to use cmake to download ITK source code and build my projects. By it gives me strange error:
“CMake Error at CMakeLists.txt:18 (include):
include called with wrong number of arguments. include() only takes one
file.”
Does anybody know what I am doing wrong here?
Thanks!
Here is my CMakeLists.txt file:
cmake_minimum_required(VERSION 3.19.7 FATAL_ERROR)
project(test LANGUAGES CXX)
set(BUILD_TESTING OFF)
set(BUILD_EXAMPLES OFF)
include(FetchContent)
FetchContent_Declare(
ITK
GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITK.git
GIT_TAG v5.3.0
FIND_PACKAGE_ARGS NAMES ITK
)
FetchContent_MakeAvailable(ITK)
find_package(ITK REQUIRED)
add_executable(test test.cpp)
target_link_libraries(test ${ITK_LIBRARIES})