Unknown CMake command “ExternalProject_Add”
I have following CMakeLists.txt file: cmake_minimum_required (VERSION 3.2 FATAL_ERROR) project (utils VERSION 1.0.0 LANGUAGES CXX) ExternalProject_Add(json-c GIT_REPOSITORY "https://github.com/json-c/json-c.git" UPDATE_COMMAND git pull "https://github.com/json-c/json-c.git" CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/SDL_image/./configure --prefix=${SDL_INSTALL_DIR} SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/json-c INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR} ) I want to add json-c library to my project, but when I run cmake I'm getting error: Unknown CMake command "ExternalProject_Add". My CMake