diff options
author | dundargoc <gocdundar@gmail.com> | 2024-01-01 13:08:56 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2024-01-24 12:41:09 +0100 |
commit | ae3eed53d6100598b6d26fe58e3e97541e03f3c1 (patch) | |
tree | c87cc525c00d5f11e6babd84cac888b60c3fbefb /cmake.deps/cmake | |
parent | 32849d56671cc74d7a1b0858638c698444ac237f (diff) | |
download | rneovim-ae3eed53d6100598b6d26fe58e3e97541e03f3c1.tar.gz rneovim-ae3eed53d6100598b6d26fe58e3e97541e03f3c1.tar.bz2 rneovim-ae3eed53d6100598b6d26fe58e3e97541e03f3c1.zip |
build: various build improvements
- remove "ran-" prefix from touch files as it's redundant since the
they're already in the directory named `touches`.
- Include `contrib` when formatting with `make formatlua`.
- Use TARGET_FILE generator expression instead of assuming the
executable location.
- reuse logic that determines whether to use lua or luajit.
- add translations to the `nvim` target.
Makefile improvements:
- rename variable `CMAKE_PRG` to `CMAKE` to make it more consistent with
the builtin `MAKE` variable.
- stop propagating flags to generator. Users should use cmake for
non-standard use cases.
- remove `+` prefix from targets. If the user for whatever reason wants
to dry-run a target then they should be able to.
Diffstat (limited to 'cmake.deps/cmake')
-rw-r--r-- | cmake.deps/cmake/BuildLpeg.cmake | 18 | ||||
-rw-r--r-- | cmake.deps/cmake/BuildLuv.cmake | 13 |
2 files changed, 2 insertions, 29 deletions
diff --git a/cmake.deps/cmake/BuildLpeg.cmake b/cmake.deps/cmake/BuildLpeg.cmake index bba23fe42b..b65baf4c0f 100644 --- a/cmake.deps/cmake/BuildLpeg.cmake +++ b/cmake.deps/cmake/BuildLpeg.cmake @@ -1,19 +1,3 @@ -set(LPEG_INCLUDE_FLAGS ${DEPS_INCLUDE_FLAGS}) - -if(NOT USE_BUNDLED_LUAJIT AND NOT USE_BUNDLED_LUA) - find_package(Luajit) - if(LUAJIT_FOUND) - string(CONCAT LPEG_INCLUDE_FLAGS ${DEPS_INCLUDE_FLAGS} " -I${LUAJIT_INCLUDE_DIR}") - else() - find_package(Lua 5.1 EXACT) - if(LUA_FOUND) - string(CONCAT LPEG_INCLUDE_FLAGS ${DEPS_INCLUDE_FLAGS} " -I${LUA_INCLUDE_DIR}") - endif() - endif() -endif() - -list(APPEND LPEG_CMAKE_ARGS -DCMAKE_C_FLAGS=${LPEG_INCLUDE_FLAGS}) - ExternalProject_Add(lpeg URL ${LPEG_URL} URL_HASH SHA256=${LPEG_SHA256} @@ -21,7 +5,7 @@ ExternalProject_Add(lpeg PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/cmake/LpegCMakeLists.txt ${DEPS_BUILD_DIR}/src/lpeg/CMakeLists.txt - CMAKE_ARGS ${DEPS_CMAKE_ARGS} ${LPEG_CMAKE_ARGS} + CMAKE_ARGS ${DEPS_CMAKE_ARGS} -DCMAKE_C_FLAGS=${DEPS_INCLUDE_FLAGS} CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS} ${EXTERNALPROJECT_OPTIONS}) diff --git a/cmake.deps/cmake/BuildLuv.cmake b/cmake.deps/cmake/BuildLuv.cmake index 004fea7790..9830ea717a 100644 --- a/cmake.deps/cmake/BuildLuv.cmake +++ b/cmake.deps/cmake/BuildLuv.cmake @@ -5,18 +5,7 @@ set(LUV_CMAKE_ARGS -D BUILD_STATIC_LIBS=ON -D BUILD_MODULE=OFF) -if(USE_BUNDLED_LUAJIT) - list(APPEND LUV_CMAKE_ARGS -D WITH_LUA_ENGINE=LuaJit) -elseif(USE_BUNDLED_LUA) - list(APPEND LUV_CMAKE_ARGS -D WITH_LUA_ENGINE=Lua) -else() - find_package(Luajit) - if(LUAJIT_FOUND) - list(APPEND LUV_CMAKE_ARGS -D WITH_LUA_ENGINE=LuaJit) - else() - list(APPEND LUV_CMAKE_ARGS -D WITH_LUA_ENGINE=Lua) - endif() -endif() +list(APPEND LUV_CMAKE_ARGS -D WITH_LUA_ENGINE=${LUA_ENGINE}) if(USE_BUNDLED_LIBUV) list(APPEND LUV_CMAKE_ARGS -D CMAKE_PREFIX_PATH=${DEPS_INSTALL_DIR}) |