From b05100a9eaad5980ea7652137bc4a1c2d15d752f Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Thu, 26 Jan 2023 00:06:52 +0100 Subject: build: use cmake to build libvterm on all platform (#21986) 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. --- cmake.deps/cmake/BuildLibvterm.cmake | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) (limited to 'cmake.deps/cmake/BuildLibvterm.cmake') diff --git a/cmake.deps/cmake/BuildLibvterm.cmake b/cmake.deps/cmake/BuildLibvterm.cmake index 1578d56fba..b75987eb24 100644 --- a/cmake.deps/cmake/BuildLibvterm.cmake +++ b/cmake.deps/cmake/BuildLibvterm.cmake @@ -1,27 +1,3 @@ -if(WIN32) - set(LIBVTERM_CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/cmake/LibvtermCMakeLists.txt - ${DEPS_BUILD_DIR}/src/libvterm/CMakeLists.txt - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Libvterm-tbl2inc_c.cmake - ${DEPS_BUILD_DIR}/src/libvterm/tbl2inc_c.cmake - COMMAND ${CMAKE_COMMAND} ${DEPS_BUILD_DIR}/src/libvterm - -DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR} - -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} - -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM} - -DCMAKE_GENERATOR=${CMAKE_GENERATOR} - -DCMAKE_POSITION_INDEPENDENT_CODE=ON) - set(LIBVTERM_BUILD_COMMAND ${CMAKE_COMMAND} --build . --config $) - set(LIBVTERM_INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config $) -else() - set(LIBVTERM_INSTALL_COMMAND ${MAKE_PRG} CC=${DEPS_C_COMPILER} - PREFIX=${DEPS_INSTALL_DIR} - CFLAGS=-fPIC - LDFLAGS+=-static - ${DEFAULT_MAKE_CFLAGS} - install) -endif() - if(USE_EXISTING_SRC_DIR) unset(LIBVTERM_URL) endif() @@ -30,10 +6,9 @@ ExternalProject_Add(libvterm URL_HASH SHA256=${LIBVTERM_SHA256} DOWNLOAD_NO_PROGRESS TRUE DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/libvterm - BUILD_IN_SOURCE 1 - CONFIGURE_COMMAND "${LIBVTERM_CONFIGURE_COMMAND}" - BUILD_COMMAND "${LIBVTERM_BUILD_COMMAND}" - INSTALL_COMMAND "${LIBVTERM_INSTALL_COMMAND}" + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/LibvtermCMakeLists.txt + ${DEPS_BUILD_DIR}/src/libvterm/CMakeLists.txt CMAKE_ARGS ${DEPS_CMAKE_ARGS} CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS}) -- cgit From 5ffd3d035dfd3d7f6e66edbaa895b98792ba3de3 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 19 Feb 2023 21:11:27 +0100 Subject: build: build all dependencies in parallel (#22329) Previously, all targets were connected in one main target called third-party in order to remove any potentially conflicting shared library. We can make each dependency target independent of each other by only removing shared libraries from luajit and msgpack in their own targets, as only these has unwanted shared libraries. --- cmake.deps/cmake/BuildLibvterm.cmake | 2 -- 1 file changed, 2 deletions(-) (limited to 'cmake.deps/cmake/BuildLibvterm.cmake') diff --git a/cmake.deps/cmake/BuildLibvterm.cmake b/cmake.deps/cmake/BuildLibvterm.cmake index b75987eb24..c86a798a57 100644 --- a/cmake.deps/cmake/BuildLibvterm.cmake +++ b/cmake.deps/cmake/BuildLibvterm.cmake @@ -11,5 +11,3 @@ ExternalProject_Add(libvterm ${DEPS_BUILD_DIR}/src/libvterm/CMakeLists.txt CMAKE_ARGS ${DEPS_CMAKE_ARGS} CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS}) - -list(APPEND THIRD_PARTY_DEPS libvterm) -- cgit From 0007aa50bd3d54259bb4ae717c114f5524ec59fa Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 4 Mar 2023 00:30:07 +0100 Subject: build: unset variables ending with "URL" if USE_EXISTING_SRC_DIR is ON This will reduce required boilerplate, but more importantly it will automatically unset variables ending on URL. This will help people needing to avoid to unset the URL variable each time a new dependency is added. It is possible that this may remove a non-download variable ending on "URL" in the future, however, the risk of this is likely much lower than the risk of someone forgetting to unset the variable. --- cmake.deps/cmake/BuildLibvterm.cmake | 3 --- 1 file changed, 3 deletions(-) (limited to 'cmake.deps/cmake/BuildLibvterm.cmake') diff --git a/cmake.deps/cmake/BuildLibvterm.cmake b/cmake.deps/cmake/BuildLibvterm.cmake index c86a798a57..aaeabe88d5 100644 --- a/cmake.deps/cmake/BuildLibvterm.cmake +++ b/cmake.deps/cmake/BuildLibvterm.cmake @@ -1,6 +1,3 @@ -if(USE_EXISTING_SRC_DIR) - unset(LIBVTERM_URL) -endif() ExternalProject_Add(libvterm URL ${LIBVTERM_URL} URL_HASH SHA256=${LIBVTERM_SHA256} -- cgit From 99b8a343e197cdec53f752e1cce01ae25eb45c12 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 20 Nov 2023 12:42:54 +0100 Subject: fixup: quick update, squash later --- cmake.deps/cmake/BuildLibvterm.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmake.deps/cmake/BuildLibvterm.cmake') diff --git a/cmake.deps/cmake/BuildLibvterm.cmake b/cmake.deps/cmake/BuildLibvterm.cmake index aaeabe88d5..63f5872cb2 100644 --- a/cmake.deps/cmake/BuildLibvterm.cmake +++ b/cmake.deps/cmake/BuildLibvterm.cmake @@ -1,10 +1,10 @@ ExternalProject_Add(libvterm URL ${LIBVTERM_URL} URL_HASH SHA256=${LIBVTERM_SHA256} - DOWNLOAD_NO_PROGRESS TRUE DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/libvterm PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/cmake/LibvtermCMakeLists.txt ${DEPS_BUILD_DIR}/src/libvterm/CMakeLists.txt CMAKE_ARGS ${DEPS_CMAKE_ARGS} - CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS}) + CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS} + ${EXTERNALPROJECT_OPTIONS}) -- cgit