neovim/third-party/cmake/BuildLibtermkey.cmake
Marco Hinz 27c3143466
third-party: libtermkey v0.20 -> v0.21.1
$ bzr log --line --forward -r v0.20..

372: Paul "LeoNerd" Evans 2017-03-30 {v0.20} Bumped VERSION to 0.20
373: Paul "LeoNerd" Evans 2017-04-10 [merge] Apply typo fixes from jamessan
374: Paul "LeoNerd" Evans 2017-11-29 Build termkey.pc by invoking a small shell script instead of sed'ing a template
375: Paul "LeoNerd" Evans 2018-03-29 Implement mouse key parsing (thanks Marc André Tanner <mat@brain-dump.org>)
376: Paul "LeoNerd" Evans 2019-01-02 Bugfix for infinite CPU spin on TERM=dumb, which has no terminfo key strings
377: Paul "LeoNerd" Evans 2019-02-14 Fix a couple of valgrind-cleanness errors in DEBUG mode
378: Paul "LeoNerd" Evans 2019-02-14 Fix valgrind uninitialised value warning
379: Paul "LeoNerd" Evans 2019-02-14 Remember to unibi_destroy() even if we never (lazily) loaded terminfo
380: Paul "LeoNerd" Evans 2019-02-14 Bugfix memory leak in TI driver on xterm
381: Paul "LeoNerd" Evans 2019-02-17 driver-ti.c does not need a separate TYPE_MOUSE node type since TERMKEY_TYPE_MOUSE already exists
382: Paul "LeoNerd" Evans 2019-02-17 Perform TI string lookup by iterating all the strings we care about, rather than iterating everything in the DB; that way a hook function can invent new strings
383: Paul "LeoNerd" Evans 2019-02-17 Avoid nonstandard \e sequence in unit tests (via neovim https://github.com/neovim/neovim/blob/master/third-party/patches/libtermkey-Fix-escape-sequences-for-MSVC.p...
384: Paul "LeoNerd" Evans 2019-02-17 win32: Win32 lacks <unistd.h> and S_ISFIFO()
385: Paul "LeoNerd" Evans 2019-02-17 win32: Win32 needs help to get ssize_t
386: Paul "LeoNerd" Evans 2019-02-17 win32: Win32 has no <termios.h>
387: Paul "LeoNerd" Evans 2019-02-17 win32: Win32 has no poll() so cannot provide termkey_waitkey()
388: Paul "LeoNerd" Evans 2019-02-17 win32: Win32 has no <strings.h> and needs help getting strcasecmp()
389: Paul "LeoNerd" Evans 2019-02-17 Write the version into the .pc file at 'make install' time so we don't get@VERSION@ from source
390: Paul "LeoNerd" Evans 2019-02-19 {v0.21} Bumped VERSION to 0.21
391: Paul "LeoNerd" Evans 2019-02-19 Bugfix to missing TERMIOS support
392: Paul "LeoNerd" Evans 2019-02-19 Fix offbyone buffer overflow in sprintf calculation of key names (neovim #9630)
393: Paul "LeoNerd" Evans 2019-02-19 {v0.21.1} Remove a pointless (and warny) cast

Our local patches are now part of the libtermkey repo and get removed.
2019-02-21 22:23:54 +01:00

57 lines
2.2 KiB
CMake

if(WIN32)
ExternalProject_Add(libtermkey
PREFIX ${DEPS_BUILD_DIR}
URL ${LIBTERMKEY_URL}
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/libtermkey
DOWNLOAD_COMMAND ${CMAKE_COMMAND}
-DPREFIX=${DEPS_BUILD_DIR}
-DDOWNLOAD_DIR=${DEPS_DOWNLOAD_DIR}/libtermkey
-DURL=${LIBTERMKEY_URL}
-DEXPECTED_SHA256=${LIBTERMKEY_SHA256}
-DTARGET=libtermkey
-DUSE_EXISTING_SRC_DIR=${USE_EXISTING_SRC_DIR}
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/DownloadAndExtractFile.cmake
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/cmake/libtermkeyCMakeLists.txt
${DEPS_BUILD_DIR}/src/libtermkey/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} ${DEPS_BUILD_DIR}/src/libtermkey
-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
# Pass toolchain
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
# Hack to avoid -rdynamic in Mingw
-DCMAKE_SHARED_LIBRARY_LINK_C_FLAGS=""
-DCMAKE_GENERATOR=${CMAKE_GENERATOR}
-DUNIBILIUM_INCLUDE_DIRS=${DEPS_INSTALL_DIR}/include
-DUNIBILIUM_LIBRARIES=${DEPS_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}unibilium${CMAKE_STATIC_LIBRARY_SUFFIX}
BUILD_COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE}
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config ${CMAKE_BUILD_TYPE})
else()
find_package(PkgConfig REQUIRED)
ExternalProject_Add(libtermkey
PREFIX ${DEPS_BUILD_DIR}
URL ${LIBTERMKEY_URL}
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/libtermkey
DOWNLOAD_COMMAND ${CMAKE_COMMAND}
-DPREFIX=${DEPS_BUILD_DIR}
-DDOWNLOAD_DIR=${DEPS_DOWNLOAD_DIR}/libtermkey
-DURL=${LIBTERMKEY_URL}
-DEXPECTED_SHA256=${LIBTERMKEY_SHA256}
-DTARGET=libtermkey
-DUSE_EXISTING_SRC_DIR=${USE_EXISTING_SRC_DIR}
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/DownloadAndExtractFile.cmake
CONFIGURE_COMMAND ""
BUILD_IN_SOURCE 1
BUILD_COMMAND ""
INSTALL_COMMAND ${MAKE_PRG} CC=${DEPS_C_COMPILER}
PREFIX=${DEPS_INSTALL_DIR}
PKG_CONFIG_PATH=${DEPS_LIB_DIR}/pkgconfig
CFLAGS=-fPIC
${DEFAULT_MAKE_CFLAGS}
install)
endif()
list(APPEND THIRD_PARTY_DEPS libtermkey)
add_dependencies(libtermkey unibilium)