Skip to content

Commit

Permalink
backend: change backend dir
Browse files Browse the repository at this point in the history
* backend is now in /backend instead of /grpc/server
* update readme
* change BUILD_DRONECORESERVER to BUILD_BACKEND in Makefile
  • Loading branch information
JonasVautherin committed Mar 6, 2018
1 parent d19f0c8 commit 16d5f79
Show file tree
Hide file tree
Showing 33 changed files with 23 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Expand Up @@ -11,7 +11,7 @@
path = core/third_party/tinyxml2
url = https://github.com/leethomason/tinyxml2.git
[submodule "dronecore-proto"]
path = grpc/server/proto
path = backend/proto
url = https://github.com/dronecore/DroneCore-Proto.git
[submodule "zlib"]
path = third_party/zlib
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Expand Up @@ -52,11 +52,11 @@ if(BUILD_TESTS)
include(cmake/unit_tests.cmake)
endif()

if (CMAKE_BUILD_DRONECORESERVER)
if (CMAKE_BUILD_BACKEND)
message(STATUS "Building dronecore server")
add_subdirectory(grpc/server)
add_subdirectory(backend)
else()
message(STATUS "BUILD_DRONECORESERVER not set: not building dronecore server")
message(STATUS "BUILD_BACKEND not set: not building grpc backend")
endif()

if (DROP_DEBUG EQUAL 1)
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -42,7 +42,7 @@ CURL_BUILD_DIR := $(ROOT_DIR)/core/third_party/curl-android-ios
CMAKE_BIN = cmake

INSTALL_PREFIX ?= /usr/local
BUILD_DRONECORESERVER ?= NO
BUILD_BACKEND ?= NO

# Function to create build_* directory and call make there.
define cmake-build
Expand All @@ -55,7 +55,7 @@ define cmake-build
-DEXTERNAL_DIR:STRING=$(EXTERNAL_DIR) \
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \
-DCMAKE_INSTALL_PREFIX=$(INSTALL_PREFIX) \
-DCMAKE_BUILD_DRONECORESERVER=$(BUILD_DRONECORESERVER) \
-DCMAKE_BUILD_BACKEND=$(BUILD_BACKEND) \
-DDROP_DEBUG=$(DROP_DEBUG) \
-G$(CMAKE_GENERATOR)) \
|| (rm -rf $(BUILD_DIR)) \
Expand Down
File renamed without changes.
15 changes: 15 additions & 0 deletions backend/README.md
@@ -0,0 +1,15 @@
# DroneCore with GRPC

### Build with backend

```
make BUILD_BACKEND=YES
```

### Run the backend

The backend is built as an executable:

```
./build/default/backend/src/backend_bin
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -45,7 +45,7 @@ target_include_directories(backend
PRIVATE
${CMAKE_SOURCE_DIR}/core
${CMAKE_SOURCE_DIR}/plugins
${CMAKE_BINARY_DIR}/grpc/server/src
${CMAKE_BINARY_DIR}/backend/src
${PLUGINS_DIR}
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -12,7 +12,7 @@ target_include_directories(unit_tests_backend
${CMAKE_CURRENT_SOURCE_DIR}/../src
${CMAKE_CURRENT_SOURCE_DIR}/../src/plugins
${CMAKE_SOURCE_DIR}/plugins
${CMAKE_BINARY_DIR}/grpc/server/src
${CMAKE_BINARY_DIR}/backend/src
)

target_link_libraries(unit_tests_backend
Expand Down
File renamed without changes.
File renamed without changes.
30 changes: 0 additions & 30 deletions grpc/README.md

This file was deleted.

0 comments on commit 16d5f79

Please sign in to comment.