mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
b05100a9ea
Also remove Libvterm-tbl2inc_c.cmake as it's not required. It's used to generate files that are already provided by the Libvterm project by default. It's also not really something we need to concern ourselves with as it's more of an authoring tool for the Libvterm creator as mentioned in https://github.com/neovim/neovim/pull/21986#issuecomment-1403733054.
33 lines
923 B
CMake
33 lines
923 B
CMake
cmake_minimum_required(VERSION 3.10)
|
|
project(libvterm LANGUAGES C)
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
if(MSVC)
|
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
|
|
else()
|
|
add_compile_options(-std=c99)
|
|
endif()
|
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/include)
|
|
include_directories(${CMAKE_BINARY_DIR})
|
|
|
|
file(GLOB VTERM_SOURCES ${CMAKE_SOURCE_DIR}/src/*.c)
|
|
add_library(vterm ${VTERM_SOURCES})
|
|
install(TARGETS vterm ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
install(FILES include/vterm.h include/vterm_keycodes.h
|
|
DESTINATION include)
|
|
|
|
if(NOT WIN32)
|
|
file(GLOB BIN_SOURCES ${CMAKE_SOURCE_DIR}/bin/*.c)
|
|
foreach(EXE_C ${BIN_SOURCES})
|
|
get_filename_component(target_name ${EXE_C} NAME_WE)
|
|
add_executable(${target_name} ${EXE_C})
|
|
target_link_libraries(${target_name} vterm)
|
|
install(TARGETS ${target_name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
endforeach()
|
|
endif()
|
|
|
|
# vim: set ft=cmake:
|