Skip to content

Commit

Permalink
Fix capnp/capnpc --version when built using CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
nyanpasu64 committed Aug 17, 2021
1 parent 5022ace commit 057bf26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions c++/src/capnp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@ if(NOT CAPNP_LITE)
set_target_properties(capnp_tool PROPERTIES CAPNP_INCLUDE_DIRECTORY
$<JOIN:$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>,$<INSTALL_INTERFACE:${CMAKE_INSTALL_BINDIR}/..>>
)
set_target_properties(capnp_tool PROPERTIES
COMPILE_DEFINITIONS CAPNP_INCLUDE_DIR=\"${CMAKE_INSTALL_FULL_INCLUDEDIR}\"
target_compile_definitions(capnp_tool PRIVATE
CAPNP_INCLUDE_DIR="${CMAKE_INSTALL_FULL_INCLUDEDIR}"
VERSION="${VERSION}"
)

add_executable(capnpc_cpp
Expand Down

0 comments on commit 057bf26

Please sign in to comment.