--- CMakeLists.txt.orig	2022-11-09 12:37:21 UTC
+++ CMakeLists.txt
@@ -29,20 +29,22 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_D
 
 # Antlr 4 configuration
 
-# This is an alternate way of supplying the Antlr 4 sources that will override
-# the git clone of the tag listed below. This is especially useful if you
-# encounter compiler problems and need to make small edits to compensate. Start
-# with the Antlr project's sources, e.g.
-# https://www.antlr.org/download/antlr4-cpp-runtime-4.9.3-source.zip
-# set(ANTLR4_ZIP_REPOSITORY "/path_to_antlr4_archive/a4.zip")
+find_path(ANTLR4_INCLUDE_DIR
+    NAMES antlr4-runtime.h
+    PATH_SUFFIXES antlr4-runtime
+    REQUIRED
+)
+find_library(ANTLR4_LIBRARY
+    NAMES antlr4-runtime
+    REQUIRED
+)
+add_library(afdko::antlr4 SHARED IMPORTED GLOBAL)
+set_target_properties(afdko::antlr4 PROPERTIES
+    IMPORTED_LOCATION "${ANTLR4_LIBRARY}"
+    INTERFACE_INCLUDE_DIRECTORIES "${ANTLR4_INCLUDE_DIR}"
+)
 
-set(ANTLR4_WITH_STATIC_CRT OFF)
-# set(ANTLR4_TAG tags/4.13.2)
-# This is a more recent commit than 4.13.2 that addresses a missing
-# include directive needed in more recent Visual Studio releases
-set(ANTLR4_TAG df4d68c09cdef73e023b8838a8bc7ca4dff1d1de)
-set(LIBXML2_TAG tags/v2.9.13)
-add_subdirectory(third_party)
+find_package(LibXml2 REQUIRED)
 
 # ============================================================================
 # Version Generation
@@ -140,4 +142,4 @@ endif()
     target_link_libraries(_internal PRIVATE Threads::Threads)
 endif()
 
-install(TARGETS _internal LIBRARY DESTINATION afdko)
+install(TARGETS _internal LIBRARY DESTINATION ${Python_SITELIB}/afdko)
