开源中国 2018 年度最后一场技术盛会邀你来约~错过就要等明年啦!点此立即预约

RonxBulld / ftrpcC++GPL-3.0

Metrics
0
Watch 12 Star 36 Fork 5
Sign up for free
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
这是一个简单的异步RPC框架,基于JSON进行传输。程序只进行打/解包参数工作,不涉及具体通信方式,socket、websocket都可以使用。目前作者使用此项目生成 typescript 前端和 C++ 后端,更多语言将被支持。 spread retract

https://gitee.com/RonxBulld/ftrpc/wikis

  • C 81.1%
  • C++ 17.7%
  • JavaScript 0.7%
  • TypeScript 0.3%
  • CMake 0.1%
  • Other 0.1%
CMakeLists.txt 1.75 KB
Copy Edit Web IDE Raw Blame History
cmake_minimum_required(VERSION 3.5)
project(ftrpc)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS -std=c++17)
IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
ADD_CUSTOM_COMMAND(OUTPUT copy_res
COMMAND @xcopy $(CMAKE_SOURCE_DIR)\\template .\\template /e/h/y/i
COMMAND @copy $(CMAKE_SOURCE_DIR)\\License.txt .\\License.txt
COMMAND @copy $(CMAKE_SOURCE_DIR)\\TypeDef.h .\\TypeDef.h
COMMAND @copy $(CMAKE_SOURCE_DIR)\\keywords.h .\\keywords.h
COMMAND @copy $(CMAKE_SOURCE_DIR)\\sample\\test.idl .\\test.idl
)
ADD_CUSTOM_COMMAND(OUTPUT auto_deploy
COMMAND @copy .\\ftrpc.exe ..\\bin\\ftrpc.exe
COMMAND @xcopy $(CMAKE_SOURCE_DIR)\\template ..\\bin\\template /e/h/y/i
)
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
ADD_CUSTOM_COMMAND(OUTPUT copy_res
COMMAND cp -a $(CMAKE_SOURCE_DIR)/template ./template
COMMAND cp $(CMAKE_SOURCE_DIR)/License.txt ./License.txt
COMMAND cp $(CMAKE_SOURCE_DIR)/TypeDef.h ./TypeDef.h
COMMAND cp $(CMAKE_SOURCE_DIR)/keywords.h ./keywords.h
COMMAND cp $(CMAKE_SOURCE_DIR)/sample/test.idl ./test.idl
)
ADD_CUSTOM_COMMAND(OUTPUT auto_deploy
COMMAND copy ./ftrpc ../bin/ftrpc
COMMAND cp -a $(CMAKE_SOURCE_DIR)/template ../bin/template
)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_executable(ftrpc main.cpp json_export.h
lex.cpp lex.h keywords.h parser.cpp parser.h ast_tree.h TypeDef.h symman.cpp symman.h
jsoncpp.cpp
Gen/GenCPP.cpp Gen/GenCPP.h Gen/GenUtils.cpp Gen/GenUtils.h Gen/GenTS.cpp Gen/GenTS.h
copy_res)
add_custom_target(AutoDeploy ALL DEPENDS ftrpc auto_deploy)

Comment ( 0 )

You need to Sign in for post a comment

Help Search