10月20日,北京【人工智能】源创会火热报名中,点击报名收获 AI 训练指南
Watch Star Fork

RonxBulld / ftrpcC++GPL-3.0

CMakeLists.txt 1.75 KB · 1 Lines
一键复制 编辑 Web IDE 原始数据 标准视图 历史
1 cmake_minimum_required(VERSION 3.5)
2 project(ftrpc)
3
4 set(CMAKE_CXX_STANDARD 17)
5 set(CMAKE_CXX_FLAGS -std=c++17)
6
7 IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
8 ADD_CUSTOM_COMMAND(OUTPUT copy_res
9 COMMAND @xcopy $(CMAKE_SOURCE_DIR)\\template .\\template /e/h/y/i
10 COMMAND @copy $(CMAKE_SOURCE_DIR)\\License.txt .\\License.txt
11 COMMAND @copy $(CMAKE_SOURCE_DIR)\\TypeDef.h .\\TypeDef.h
12 COMMAND @copy $(CMAKE_SOURCE_DIR)\\keywords.h .\\keywords.h
13 COMMAND @copy $(CMAKE_SOURCE_DIR)\\sample\\test.idl .\\test.idl
14 )
15 ADD_CUSTOM_COMMAND(OUTPUT auto_deploy
16 COMMAND @copy .\\ftrpc.exe ..\\bin\\ftrpc.exe
17 COMMAND @xcopy $(CMAKE_SOURCE_DIR)\\template ..\\bin\\template /e/h/y/i
19 ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
20 ADD_CUSTOM_COMMAND(OUTPUT copy_res
21 COMMAND cp -a $(CMAKE_SOURCE_DIR)/template ./template
22 COMMAND cp $(CMAKE_SOURCE_DIR)/License.txt ./License.txt
23 COMMAND cp $(CMAKE_SOURCE_DIR)/TypeDef.h ./TypeDef.h
24 COMMAND cp $(CMAKE_SOURCE_DIR)/keywords.h ./keywords.h
25 COMMAND cp $(CMAKE_SOURCE_DIR)/sample/test.idl ./test.idl
27 ADD_CUSTOM_COMMAND(OUTPUT auto_deploy
28 COMMAND copy ./ftrpc ../bin/ftrpc
29 COMMAND cp -a $(CMAKE_SOURCE_DIR)/template ../bin/template
31 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Windows")
33 lex.cpp lex.h keywords.h parser.cpp parser.h ast_tree.h TypeDef.h symman.cpp symman.h
34 jsoncpp.cpp
35 Gen/GenCPP.cpp Gen/GenCPP.h Gen/GenUtils.cpp Gen/GenUtils.h Gen/GenTS.cpp Gen/GenTS.h
37 add_custom_target(AutoDeploy ALL DEPENDS ftrpc auto_deploy)

搜索帮助