updat jsoncpp and cleanup build env
This commit is contained in:
@@ -5,9 +5,11 @@ else ()
|
||||
set (CMAKE_CXX_STANDARD 11)
|
||||
endif ()
|
||||
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
||||
project (1261nat)
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
SET(BUILD_SHARED_LIBS ON)
|
||||
|
||||
SET(JSONCPP_WITH_TESTS OFF CACHE BOOL "test8")
|
||||
SET(JSONCPP_WITH_POST_BUILD_UNITTEST OFF CACHE BOOL "tes9")
|
||||
@@ -34,4 +36,13 @@ file(GLOB_RECURSE 1261nat_src_files "src/*.h" "src/*.cpp")
|
||||
add_executable(1261nat ${1261nat_src_files} )
|
||||
target_link_libraries (1261nat pthread tins jsoncpp_lib_static)
|
||||
|
||||
ADD_SUBDIRECTORY(test)
|
||||
file(COPY src/config-example.json DESTINATION ${CMAKE_BINARY_DIR} )
|
||||
install(TARGETS 1261nat
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib/static)
|
||||
install(FILES src/config-example.json DESTINATION /etc/1261nat)
|
||||
|
||||
if (with-tests)
|
||||
ADD_SUBDIRECTORY(test)
|
||||
endif ()
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
src
|
||||
lib/libtins/include
|
||||
test/src
|
||||
test/lib/FakeIt
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
CURRENT_DIR="$(pwd)"
|
||||
cd "$(dirname "$0")" || exit
|
||||
PROJECT_NAME="$(basename "$(dirname "$(pwd)")")"
|
||||
PROJECT_PATH="../projectfiles/codeblock/$PROJECT_NAME"
|
||||
mkdir -p "$PROJECT_PATH"
|
||||
cd "$PROJECT_PATH" || exit
|
||||
cmake ../../../ -G "CodeBlocks - Unix Makefiles"
|
||||
|
||||
if [ -d "../../../test" ]; then
|
||||
TEST_PROJECT_PATH="../test-$PROJECT_NAME"
|
||||
mkdir -p "$TEST_PROJECT_PATH"
|
||||
cd "$TEST_PROJECT_PATH" || exit
|
||||
cmake ../../../test -G "CodeBlocks - Unix Makefiles"
|
||||
fi
|
||||
|
||||
cd $CURRENT_DIR || exit
|
||||
File diff suppressed because it is too large
Load Diff
Submodule lib/jsoncpp updated: d7347a2623...56efb6ba83
33
src/config-example.json
Normal file
33
src/config-example.json
Normal file
@@ -0,0 +1,33 @@
|
||||
[
|
||||
{
|
||||
"name" : "eth0<->eth1",
|
||||
"items":
|
||||
[
|
||||
{
|
||||
"nic-name": "eth0",
|
||||
"type": 4
|
||||
},
|
||||
{
|
||||
"nic-name": "eth1",
|
||||
"type": 6,
|
||||
"mtu": 1000,
|
||||
"prefix": "42::"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "eth2<->eth3",
|
||||
"items":
|
||||
[
|
||||
{
|
||||
"nic-name": "eth2",
|
||||
"type": 4
|
||||
},
|
||||
{
|
||||
"nic-name": "eth3",
|
||||
"type": 6,
|
||||
"prefix": "23::"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -10,7 +10,6 @@ if(COMMAND cmake_policy)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
||||
project(test_1261nat)
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
|
||||
INCLUDE_DIRECTORIES(../lib/libtins/include ../lib/jsoncpp/include)
|
||||
include_directories("lib/FakeIt/")
|
||||
|
||||
Reference in New Issue
Block a user