···11+commit 105daa26f09034af58eb13ac7c5c4ff5420c1724
22+Author: sternenseemann <sternenseemann@systemli.org>
33+Date: Tue Oct 5 18:16:10 2021 +0200
44+55+ Link against system antlr4 runtime, dynamically
66+77+ Instead of cloning a antlr4 version from git, use the system one. Also
88+ don't link it statically, but dynamically by default (the library is
99+ called antlr4-runtime, not antlr4_static).
1010+1111+diff --git a/CMakeLists.txt b/CMakeLists.txt
1212+index d7f86fb6..c43c4456 100644
1313+--- a/CMakeLists.txt
1414++++ b/CMakeLists.txt
1515+@@ -36,13 +36,13 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
1616+ # https://www.antlr.org/download/antlr4-cpp-runtime-4.9.2-source.zip
1717+ # set(ANTLR4_ZIP_REPOSITORY "/path_to_antlr4_archive/a4.zip")
1818+1919+-add_definitions(-DANTLR4CPP_STATIC)
2020+ set(ANTLR4_WITH_STATIC_CRT OFF)
2121+ # Use slightly more recent commit than 4.9.2 to deal with utfcpp test
2222+ # compilation problems
2323+ # set(ANTLR4_TAG tags/4.9.2)
2424+ set(ANTLR4_TAG 916f03366edf15bf8b50010b11d479c189bf9f96)
2525+-include(ExternalAntlr4Cpp)
2626++find_path(ANTLR4_HEADER antlr4-runtime.h PATH_SUFFIXES antlr4-runtime)
2727++set(ANTLR4_INCLUDE_DIRS ${ANTLR4_HEADER})
2828+2929+ # sanitizer support
3030+ # work around https://github.com/pypa/setuptools/issues/1928 with environment
3131+diff --git a/c/makeotf/lib/hotconv/CMakeLists.txt b/c/makeotf/lib/hotconv/CMakeLists.txt
3232+index 82257bf2..02eb2e30 100644
3333+--- a/c/makeotf/lib/hotconv/CMakeLists.txt
3434++++ b/c/makeotf/lib/hotconv/CMakeLists.txt
3535+@@ -69,7 +69,7 @@ add_library(hotconv STATIC
3636+3737+ set_property(TARGET hotconv PROPERTY C_STANDARD 99)
3838+ target_include_directories(hotconv PRIVATE AFTER $<$<COMPILE_LANGUAGE:CXX>:${ANTLR4_INCLUDE_DIRS}>)
3939+-target_link_libraries(hotconv PUBLIC antlr4_static)
4040++target_link_libraries(hotconv PUBLIC antlr4-runtime)
4141+4242+ if ( CMAKE_COMPILER_IS_GNUCC )
4343+ target_compile_options(hotconv PRIVATE -Wall -Wno-attributes)