ExternalProject_Add(TH2Jagged_ext
  PREFIX "${PROJECT_BINARY_DIR}/Ext"
  GIT_REPOSITORY https://github.com/luketpickering/TH2Jagged.git
  GIT_TAG stable
  UPDATE_DISCONNECTED 1
  CMAKE_ARGS
  -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
  -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
  -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
  -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})

  LIST(APPEND INCDIRS ${PROJECT_BINARY_DIR}/Ext/src/TH2Jagged_ext/src)

LIST(REVERSE ROOT_LIBS)
LIST(APPEND ROOT_LIBS TH2Jagged)
LIST(REVERSE ROOT_LIBS)

LIST(APPEND EXTRA_LINK_DIRS ${CMAKE_INSTALL_PREFIX}/lib)
