mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Introduce nvim namespace: Fix build process.
- Leave src as include dir (for includes to recognize 'nvim/' prefix). - Change subdirectory from src to src/nvim. - Fix msgpack generation. - Fix some other paths to new locations.
This commit is contained in:
parent
da51dc9cf2
commit
a6734844ca
@ -111,7 +111,7 @@ if(${LUA_MSGPACK_MISSING})
|
||||
endif()
|
||||
|
||||
add_subdirectory(config)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(src/nvim)
|
||||
add_subdirectory(test/includes)
|
||||
|
||||
find_program(BUSTED_PRG busted)
|
||||
@ -168,5 +168,5 @@ endif()
|
||||
# well with the legacy tests. I have a branch that converts them to run under
|
||||
# CTest, but it needs a little more work.
|
||||
# add_custom_target(test
|
||||
# COMMAND ${MAKE_PRG} -C ${CMAKE_CURRENT_SOURCE_DIR}/src/testdir
|
||||
# COMMAND ${MAKE_PRG} -C ${CMAKE_CURRENT_SOURCE_DIR}/src/nvim/testdir
|
||||
# VIMPROG=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/nvim)
|
||||
|
4
Makefile
4
Makefile
@ -60,14 +60,14 @@ deps: | .deps/build/third-party/.ran-cmake
|
||||
touch $@
|
||||
|
||||
test: | nvim
|
||||
+$(SINGLE_MAKE) -C src/testdir
|
||||
+$(SINGLE_MAKE) -C src/nvim/testdir
|
||||
|
||||
unittest: | nvim
|
||||
+$(BUILD_CMD) -C build unittest
|
||||
|
||||
clean:
|
||||
+test -d build && $(BUILD_CMD) -C build clean || true
|
||||
$(MAKE) -C src/testdir clean
|
||||
$(MAKE) -C src/nvim/testdir clean
|
||||
|
||||
distclean: clean
|
||||
rm -rf .deps build
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "${PROJECT_SOURCE_DIR}/src/vim.h"
|
||||
#include "${PROJECT_SOURCE_DIR}/src/nvim/vim.h"
|
||||
char_u *default_vim_dir = (char_u *)"${CMAKE_INSTALL_PREFIX}/share/vim";
|
||||
char_u *default_vimruntime_dir = (char_u *)"";
|
||||
char_u *all_cflags = (char_u *)"${COMPILER_FLAGS}";
|
||||
|
@ -95,11 +95,11 @@ output:write([[
|
||||
#include <stdint.h>
|
||||
#include <msgpack.h>
|
||||
|
||||
#include "os/msgpack_rpc.h"
|
||||
#include "nvim/os/msgpack_rpc.h"
|
||||
]])
|
||||
|
||||
for i = 1, #headers do
|
||||
output:write('\n#include "'..headers[i]..'"')
|
||||
output:write('\n#include "nvim/'..headers[i]..'"')
|
||||
end
|
||||
|
||||
output:write([[
|
||||
|
@ -1,9 +1,9 @@
|
||||
include(CheckLibraryExists)
|
||||
|
||||
set(GENERATED_DIR ${PROJECT_BINARY_DIR}/src/auto)
|
||||
set(GENERATED_DIR ${PROJECT_BINARY_DIR}/src/nvim/auto)
|
||||
set(DISPATCH_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/msgpack-gen.lua)
|
||||
file(GLOB API_HEADERS api/*.h)
|
||||
set(MSGPACK_RPC_HEADER ${PROJECT_SOURCE_DIR}/src/os/msgpack_rpc.h)
|
||||
set(MSGPACK_RPC_HEADER ${PROJECT_SOURCE_DIR}/src/nvim/os/msgpack_rpc.h)
|
||||
set(MSGPACK_DISPATCH ${GENERATED_DIR}/msgpack_dispatch.c)
|
||||
|
||||
# Remove helpers.h from API_HEADERS since it doesn't contain public API
|
||||
|
Loading…
Reference in New Issue
Block a user