CodeCommitsIssuesPull requestsActionsInsightsSecurity
48ab9afce6f76940b27e41cf3be15877686d525c

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

cmake/find/capnp.cmake

26lines · modecode

1option (ENABLE_CAPNP "Enable Cap'n Proto" ON)
2
3if (ENABLE_CAPNP)
4
5option (USE_INTERNAL_CAPNP_LIBRARY "Set to FALSE to use system capnproto library instead of bundled" ${NOT_UNBUNDLED})
6
7# FIXME: refactor to use `add_library(… IMPORTED)` if possible.
8if (NOT USE_INTERNAL_CAPNP_LIBRARY)
9 find_library (KJ kj)
10 find_library (CAPNP capnp)
11 find_library (CAPNPC capnpc)
12
13 set (CAPNP_LIBRARIES ${CAPNPC} ${CAPNP} ${KJ})
14else ()
15 add_subdirectory(contrib/capnproto-cmake)
16
17 set (CAPNP_LIBRARIES capnpc)
18endif ()
19
20if (CAPNP_LIBRARIES)
21 set (USE_CAPNP 1)
22endif ()
23
24endif ()
25
26message (STATUS "Using capnp: ${CAPNP_LIBRARIES}")