Skip to content

Commit db98970

Browse files
committed
init
1 parent 258770f commit db98970

19 files changed

+28278
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,8 @@
3939

4040
# debug information files
4141
*.dwo
42+
43+
# wsjcpp
44+
.wsjcpp
45+
/tmp/
46+
/wsjcpp-user-session

CMakeLists.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
cmake_minimum_required(VERSION 3.0)
2+
3+
project(wsjcpp-user-session C CXX)
4+
5+
include(${CMAKE_CURRENT_SOURCE_DIR}/src.wsjcpp/CMakeLists.txt)
6+
7+
set(CMAKE_CXX_STANDARD 17)
8+
set(EXECUTABLE_OUTPUT_PATH ${wsjcpp-user-session_SOURCE_DIR})
9+
10+
# include header dirs
11+
list (APPEND WSJCPP_INCLUDE_DIRS "src")
12+
13+
list (APPEND WSJCPP_SOURCES "src/main.cpp")
14+
15+
#### BEGIN_WSJCPP_APPEND
16+
#### END_WSJCPP_APPEND
17+
18+
include_directories(${WSJCPP_INCLUDE_DIRS})
19+
20+
add_executable (wsjcpp-user-session ${WSJCPP_SOURCES})
21+
22+
target_link_libraries(wsjcpp-user-session ${WSJCPP_LIBRARIES})
23+
24+
install(
25+
TARGETS
26+
wsjcpp-user-session
27+
RUNTIME DESTINATION
28+
/usr/bin
29+
)
30+

build_simple.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
check_ret() {
4+
if [ $1 -ne 0 ]; then
5+
echo ""
6+
echo "!!! FAIL: $2"
7+
echo "********************************************************************************"
8+
echo ""
9+
exit $1
10+
else
11+
echo ""
12+
echo "*** SUCCESS: $2"
13+
echo "********************************************************************************"
14+
echo ""
15+
fi
16+
}
17+
18+
if [ ! -d tmp ]; then
19+
mkdir -p tmp
20+
fi
21+
22+
cd tmp
23+
cmake ..
24+
check_ret $? "configure"
25+
26+
make
27+
check_ret $? "make"
28+

src.wsjcpp/CMakeLists.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Automaticly generated by wsjcpp@v0.2.5
2+
cmake_minimum_required(VERSION 3.0)
3+
4+
add_definitions(-DWSJCPP_APP_VERSION="v0.0.1")
5+
add_definitions(-DWSJCPP_APP_NAME="wsjcpp-user-session")
6+
7+
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
8+
set(MACOSX TRUE)
9+
endif()
10+
11+
set(CMAKE_CXX_STANDARD 17)
12+
13+
set (WSJCPP_LIBRARIES "")
14+
set (WSJCPP_INCLUDE_DIRS "")
15+
set (WSJCPP_SOURCES "")
16+
17+
find_package(Threads REQUIRED)
18+
list (APPEND WSJCPP_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
19+
20+
# wsjcpp-core:v0.2.3
21+
list (APPEND WSJCPP_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/./src.wsjcpp/wsjcpp_core/")
22+
list (APPEND WSJCPP_SOURCES "${CMAKE_SOURCE_DIR}/./src.wsjcpp/wsjcpp_core/wsjcpp_core.cpp")
23+
list (APPEND WSJCPP_SOURCES "${CMAKE_SOURCE_DIR}/./src.wsjcpp/wsjcpp_core/wsjcpp_core.h")
24+
25+
# nlohmann/json:v3.12.0
26+
list (APPEND WSJCPP_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/./src.wsjcpp/nlohmann_json/")
27+
list (APPEND WSJCPP_SOURCES "${CMAKE_SOURCE_DIR}/./src.wsjcpp/nlohmann_json/nlohmann/json.hpp")
28+
list (APPEND WSJCPP_SOURCES "${CMAKE_SOURCE_DIR}/./src.wsjcpp/nlohmann_json/nlohmann/json_fwd.hpp")
29+
30+

0 commit comments

Comments
 (0)