File: LibvtermCMakeLists.txt

package info (click to toggle)
neovim 0.10.4-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 63,144 kB
  • sloc: ansic: 255,334; python: 1,470; lisp: 1,213; sh: 1,103; makefile: 363; xml: 78; ruby: 6
file content (28 lines) | stat: -rw-r--r-- 808 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
cmake_minimum_required(VERSION 3.13)
project(libvterm C)

add_compile_options(-w)

include(GNUInstallDirs)

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: