I'm trying to depend on a non-cmake, header-only, git library. The following seems to work:
include(ExternalProject)
ExternalProject_Add(${REPO}-external
GIT_REPOSITORY [... path to repo ... ]
GIT_TAG [... some git tag ... ]
SOURCE_DIR external/${REPO}
BUILD_COMMAND ""
INSTALL_COMMAND ""
CONFIGURE_COMMAND "")
add_library(${REPO} INTERFACE)
add_dependencies(${REPO} ${REPO}-external)
target_include_directories(${REPO} SYSTEM INTERFACE external/${REPO}/include)
But this seems really convoluted, and I expect that I'm just missing some basics about how to properly use this function. Is there a more direct approach?