-
Notifications
You must be signed in to change notification settings - Fork 573
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(proto): create object library: rime-proto-objs
- Loading branch information
Showing
4 changed files
with
26 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# search path for capnp schemata: *.capnp | ||
set(RIME_PROTO_SCHEMA_DIR ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE) | ||
# search path for generated capnp binding headers: *.capnp.h | ||
set(RIME_PROTO_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE) | ||
|
||
capnp_generate_cpp( | ||
CAPNP_SRCS | ||
CAPNP_HDRS | ||
rime_proto.capnp | ||
) | ||
message(STATUS "compiled capnproto schemata (sources): ${CAPNP_SRCS}") | ||
message(STATUS "compiled capnproto schemata (headers): ${CAPNP_HDRS}") | ||
|
||
add_library(rime-proto-objs OBJECT ${CAPNP_SRCS}) | ||
target_include_directories(rime-proto-objs PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) | ||
if(BUILD_SHARED_LIBS) | ||
set_target_properties(rime-proto-objs | ||
PROPERTIES | ||
POSITION_INDEPENDENT_CODE ON) | ||
endif() | ||
|
||
set(rime_proto_objs $<TARGET_OBJECTS:rime-proto-objs> PARENT_SCOPE) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters