Skip to content

Commit

Permalink
Merge pull request #1306 from nyanpasu64/fix-capnp-version
Browse files Browse the repository at this point in the history
Fix capnp/capnpc --version when built using CMake
  • Loading branch information
harrishancock committed Aug 18, 2021
2 parents 5022ace + 35b8dec commit 04597d7
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 04597d7

Please sign in to comment.