Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Zserio CMake helper for easier integration to CMake based projects #560

Closed
Mi-La opened this issue Jan 4, 2024 · 1 comment
Closed
Assignees
Labels
c++ C++ language generator enhancement New feature or request
Milestone

Comments

@Mi-La
Copy link
Contributor

Mi-La commented Jan 4, 2024

Currently we are working on integration of Zserio to Conan Center Index (#533). We have introduced a cmake helper which could be adopted by the upstream and packed as a part of zserio releases.

It's inspired by protobuf's solution and by zserio-cmake-helper (while it's much simpler for now).

Usage in a CMakeLists.txt (assuming that zserio is installed via conan):

find_package(zserio REQUIRED CONFIG)
add_library(tutorial_zs SHARED tutorial.zs)
zserio_generate_cpp(
    TARGET tutorial_zs
    GEN_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src
)
target_link_libraries(tutorial_zs PUBLIC zserio::ZserioCppRuntime)
target_include_directories(tutorial_zs PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
@Mi-La Mi-La added enhancement New feature or request c++ C++ language generator labels Jan 4, 2024
@Mi-La Mi-La added this to the 2.14 milestone Jan 4, 2024
Mi-La added a commit that referenced this issue Jan 22, 2024
Use also internally for zserio tests
Mi-La added a commit that referenced this issue Jan 22, 2024
Use also internally for zserio tests
Mi-La added a commit that referenced this issue Jan 22, 2024
Use also internally for zserio tests
Mi-La added a commit that referenced this issue Jan 23, 2024
Use also internally for zserio tests
Mi-La added a commit that referenced this issue Jan 23, 2024
Use also internally for zserio tests
@Mi-La Mi-La closed this as completed Jan 24, 2024
@Mi-La
Copy link
Contributor Author

Mi-La commented Jan 24, 2024

zserio_compiler.cmake will be located in release zip for binaries in the cmake subfolder. Documentation is available in README.md for C++ extension or directly in the cmake script.

Mi-La added a commit that referenced this issue Feb 20, 2024
Fix forgotten old variable name in comparison.
mikir pushed a commit that referenced this issue Apr 30, 2024
Use also internally for zserio tests
mikir pushed a commit that referenced this issue Apr 30, 2024
Fix forgotten old variable name in comparison.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ C++ language generator enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant