File tree Expand file tree Collapse file tree 3 files changed +18
-1220
lines changed
Expand file tree Collapse file tree 3 files changed +18
-1220
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,27 @@ include_directories(${ROOT}/threadpool
99file (GLOB srcs src/*.cpp )
1010add_library (prototls ${srcs} )
1111target_link_libraries (prototls gnutls protobuf pthread boost_thread )
12+ install (TARGETS prototls DESTINATION
13+ ${CMAKE_INSTALL_PREFIX} /lib)
1214
15+ install (FILES ${ROOT} /include/prototls.hpp
16+ DESTINATION ${CMAKE_INSTALL_PREFIX} /include)
17+ file (GLOB headers include /prototls/*.hpp )
18+ foreach (header ${headers} )
19+ install (FILES ${header}
20+ DESTINATION ${CMAKE_INSTALL_PREFIX} /include/prototls)
21+ endforeach (header )
22+
23+
24+ add_custom_command (OUTPUT ${ROOT} /example/my_protocol.pb.cc
25+ ${ROOT} /example/my_protocol.pb.h
26+ COMMAND
27+ protoc ${ROOT} /example/my_protocol.proto
28+ --proto_path=${ROOT}/example
29+ --cpp_out=${ROOT}/example )
1330add_library (my_protocol example/my_protocol.pb.cc )
1431add_executable (testserver example/server.cpp )
1532add_executable (testclient example/client.cpp )
1633target_link_libraries (testserver my_protocol prototls )
1734target_link_libraries (testclient my_protocol prototls )
35+
You can’t perform that action at this time.
0 commit comments