File tree Expand file tree Collapse file tree 1 file changed +8
-16
lines changed
Expand file tree Collapse file tree 1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -5,24 +5,16 @@ apply_patch_once("antlr4_fix" "${ANTLR_SRC_DIR}" "${ANTLR_PATCH}")
55set (WITH_STATIC_CRT OFF CACHE BOOL "Use dynamic CRT for antlr4" FORCE )
66add_subdirectory (antlr4/runtime/Cpp/ )
77
8- add_library (antlr4 UNKNOWN IMPORTED GLOBAL )
9- if (MSVC )
10- set (_antlr4_lib_name "antlr4-runtime-static.lib" )
11- else ()
12- set (_antlr4_lib_name "libantlr4-runtime.a" )
13- endif ()
14- set_target_properties (
15- antlr4 PROPERTIES
16- INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR} /antlr4/runtime/Cpp/runtime/src/"
17- IMPORTED_LOCATION "${EXTERNAL_LIB_DIR} /${_antlr4_lib_name} "
18- )
19- if (WIN32 )
20- set_property (TARGET antlr4 PROPERTY INTERFACE_COMPILE_DEFINITIONS "ANTLR4CPP_STATIC" )
21- endif ()
22- add_dependencies (antlr4 antlr4_static )
8+ target_include_directories (antlr4_static INTERFACE
9+ "${CMAKE_CURRENT_SOURCE_DIR} /antlr4/runtime/Cpp/runtime/src/"
10+ )
2311
2412if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
2513 target_compile_options (antlr4_static PRIVATE -Wno-unknown-pragmas -Wno-unqualified-std-cast-call )
2614elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
2715 target_compile_options (antlr4_static PRIVATE -Wno-unknown-pragmas -Wno-unqualified-std-cast-call -Wno-attributes -Wno-implicit-fallthrough )
28- endif ()
16+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
17+ target_compile_definitions (antlr4_static INTERFACE ANTLR4CPP_STATIC )
18+ endif ()
19+
20+ add_library (antlr4 ALIAS antlr4_static )
You can’t perform that action at this time.
0 commit comments