• 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
Name
Last commit
Last update
c++ Loading commit data...
doc Loading commit data...
highlighting Loading commit data...
security-advisories Loading commit data...
.gitignore Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
RELEASE-PROCESS.md Loading commit data...
mega-test-quick.cfg Loading commit data...
mega-test.cfg Loading commit data...
mega-test.py Loading commit data...
release.sh Loading commit data...
style-guide.md Loading commit data...
super-test.sh Loading commit data...