Hi,
I’m trying to use FetchContent to download ITK and build my project. But I got this string error:
CMake Error at CMakeLists.txt:18 (include):
include called with wrong number of arguments. include() only takes one
file.
Does anybody know why I am getting the include error?
Here is my CMakeLists.txt file:
cmake_minimum_required(VERSION 3.19.7 FATAL_ERROR)
project(nebula 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)
include(${ITK_USE_FILE})
add_executable(nebula hello_world.cpp)
target_link_libraries(nebula ${ITK_LIBRARIES})