Commit 17020509 authored by Kenton Varda's avatar Kenton Varda

Merge pull request #211 from Fraser999/install_schema_files

Fixed installation of schema files via CMake.
parents 960a4f6b 5bd8f541
......@@ -49,11 +49,15 @@ set(capnp_headers
pointer-helpers.h
generated-header-support.h
)
set(capnp_schemas
c++.capnp
schema.capnp
)
add_library(capnp ${capnp_sources})
target_link_libraries(capnp kj)
install(TARGETS capnp ARCHIVE DESTINATION "${LIB_INSTALL_DIR}")
install(FILES ${capnp_headers} DESTINATION "${INCLUDE_INSTALL_DIR}/capnp")
install(FILES ${capnp_headers} ${capnp_schemas} DESTINATION "${INCLUDE_INSTALL_DIR}/capnp")
set(capnp-rpc_sources
serialize-async.c++
......@@ -75,11 +79,16 @@ set(capnp-rpc_headers
persistent.capnp.h
ez-rpc.h
)
set(capnp-rpc_schemas
rpc.capnp
rpc-twoparty.capnp
persistent.capnp
)
if(NOT CAPNP_LITE)
add_library(capnp-rpc ${capnp-rpc_sources})
target_link_libraries(capnp-rpc kj-async kj)
install(TARGETS capnp-rpc ARCHIVE DESTINATION "${LIB_INSTALL_DIR}")
install(FILES ${capnp-rpc_headers} DESTINATION "${INCLUDE_INSTALL_DIR}/capnp")
install(FILES ${capnp-rpc_headers} ${capnp-rpc_schemas} DESTINATION "${INCLUDE_INSTALL_DIR}/capnp")
endif()
# Tools/Compilers ==============================================================
......@@ -95,18 +104,10 @@ set(capnpc_sources
compiler/compiler.c++
schema-parser.c++
)
set(capnpc_headers
c++.capnp
schema.capnp
rpc.capnp
rpc-twoparty.capnp
persistent.capnp
)
if(NOT CAPNP_LITE)
add_library(capnpc ${capnpc_sources})
target_link_libraries(capnpc capnp kj)
install(TARGETS capnpc ARCHIVE DESTINATION "${LIB_INSTALL_DIR}")
install(FILES ${capnpc_headers} DESTINATION "${INCLUDE_INSTALL_DIR}/capnp")
endif()
if(BUILD_TOOLS AND NOT CAPNP_LITE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment