1. 28 Apr, 2017 1 commit
  2. 17 Apr, 2017 1 commit
    • Harris Hancock's avatar
      Leave CAPNP{,C_CXX}_EXECUTABLE unset if tools aren't built · d3095dd6
      Harris Hancock authored
      When building Cap'n Proto with compilers which can't yet build the command
      line tools (MSVC), the exported targets capnp_tool and capnpc_cpp don't
      exist, thus attempting to use them in a generator expression when setting
      CAPNP_EXECUTABLE and CAPNPC_CXX_EXECUTABLE causes a hard error.
      
      Leaving the variables unset provides users the opportunity to set
      CAPNP_EXECUTABLE and CAPNPC_CXX_EXECUTABLE manually in CMake projects
      consuming Cap'n Proto as a CMake package, and produces a less mystifying
      error message if the user forgets.
      
      Thanks to Philip Quinn for advice on this issue.
      d3095dd6
  3. 27 Apr, 2016 1 commit
  4. 19 Apr, 2016 1 commit
  5. 11 Apr, 2016 1 commit
    • Alex Richardson's avatar
      Add a cmake package config module · f7d685be
      Alex Richardson authored
      This makes it a lot easier for CMake based projects to use Cap'n Proto.
      
      Example usage:
      
      find_package(CapnProto)
      capnp_generate_cpp(FOO_SRCS FOO_HDRS foo.capnp)
      add_executable(foo main.cpp ${FOO_SRCS})
      target_link_libraries(foo CapnProto::capnp CapnProto::capnp-rpc)
      
      This is a lot better than the previous variable based solution since
      linking to nonexistent targets is an error whereas an empty variable
      expansion (e.g. due to typos) will be silently ignored. It also makes
      sure that the right compiler flags, include directories, defines and
      link libraries are passed to the compiler for that target without
      needing any other include_directories(), etc.
      f7d685be