build(deps): disable shared library for libvterm. (#20566)

build(deps): disable shared library for libvterm

Problem:
Cannot build both static and share libraries for libvterm under Windows.
The static and shared library would have the same name "vterm.lib", thus there would be multiple rules to build the same target.

Solution:
Disable shared library for libvterm.

This makes it possible to use Ninja on Windows to build dependencies (2x speedup!).
But not for Release builds yet.

Co-authored-by: Wei Tang <gauchyler@uestc.edu.cn>
This commit is contained in:
Wei Tang
2022-10-11 08:46:34 +08:00
committed by GitHub
parent 26c6537180
commit 8f0b94b36d

View File

@@ -41,14 +41,6 @@ file(GLOB VTERM_SOURCES ${CMAKE_SOURCE_DIR}/src/*.c)
add_library(vterm ${VTERM_SOURCES} ${TBL_FILES_HEADERS}) add_library(vterm ${VTERM_SOURCES} ${TBL_FILES_HEADERS})
install(TARGETS vterm ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(TARGETS vterm ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
add_library(vterm-shared SHARED ${VTERM_SOURCES} ${TBL_FILES_HEADERS})
set_target_properties(vterm-shared PROPERTIES
OUTPUT_NAME vterm
SOVERSION 0)
install(TARGETS vterm-shared
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES include/vterm.h include/vterm_keycodes.h install(FILES include/vterm.h include/vterm_keycodes.h
DESTINATION include) DESTINATION include)