forked from jasder/antlr
Differentiate windows static lib suffix to avoid being clobbered
Since the install target install static and shared libs into same folder, and because on windows a shared lib also outputs a shared .lib file to link against, need to make sure the static/shared .lib files do not clobber each other.
This commit is contained in:
parent
11d185f744
commit
a2fcad61f0
|
@ -66,6 +66,11 @@ if (MSVC_VERSION)
|
||||||
target_compile_options(antlr4_static PRIVATE "/MT$<$<CONFIG:Debug>:d>")
|
target_compile_options(antlr4_static PRIVATE "/MT$<$<CONFIG:Debug>:d>")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(static_lib_suffix "")
|
||||||
|
if (MSVC_VERSION)
|
||||||
|
set(static_lib_suffix "-static")
|
||||||
|
endif()
|
||||||
|
|
||||||
set_target_properties(antlr4_shared
|
set_target_properties(antlr4_shared
|
||||||
PROPERTIES VERSION ${ANTLR_VERSION}
|
PROPERTIES VERSION ${ANTLR_VERSION}
|
||||||
SOVERSION ${ANTLR_VERSION}
|
SOVERSION ${ANTLR_VERSION}
|
||||||
|
@ -80,7 +85,7 @@ set_target_properties(antlr4_shared
|
||||||
set_target_properties(antlr4_static
|
set_target_properties(antlr4_static
|
||||||
PROPERTIES VERSION ${ANTLR_VERSION}
|
PROPERTIES VERSION ${ANTLR_VERSION}
|
||||||
SOVERSION ${ANTLR_VERSION}
|
SOVERSION ${ANTLR_VERSION}
|
||||||
OUTPUT_NAME antlr4-runtime
|
OUTPUT_NAME "antlr4-runtime${static_lib_suffix}"
|
||||||
ARCHIVE_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR}
|
ARCHIVE_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR}
|
||||||
COMPILE_FLAGS "${disabled_compile_warnings} ${extra_static_compile_flags}")
|
COMPILE_FLAGS "${disabled_compile_warnings} ${extra_static_compile_flags}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue