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

Headers C++ compat #273

Merged
merged 1 commit into from
Sep 17, 2023
Merged

Headers C++ compat #273

merged 1 commit into from
Sep 17, 2023

Conversation

kassane
Copy link
Contributor

@kassane kassane commented Sep 16, 2023

closes: #234

Testing

Project sample

add on cmakelists.txt

include(FetchContent)

find_package(relic 0.7.0)
if (NOT relic_FOUND)
    FetchContent_Declare(relic GIT_REPOSITORY https://github.com/relic-toolkit/relic.git
        GIT_TAG master) # to review replace to fork repo w/ GIT_TAG cpp-compat branch
    FetchContent_GetProperties(relic)
    set(SHLIB OFF) # disable shared library (relic option)
    FetchContent_MakeAvailable(relic)
endif()

# your application
add_executable(${PROJECT_NAME} src/main.cpp)

# linking to relic library
target_link_libraries(${PROJECT_NAME}
    PRIVATE relic_s::relic_s # static library
    # PRIVATE relic::relic # shared
)

cmake: Add library alias
cmake: get target include (needed to fetchContent)

Signed-off-by: Matheus Catarino França <[email protected]>
@dfaranha dfaranha merged commit 358e66a into relic-toolkit:main Sep 17, 2023
37 checks passed
@kassane kassane deleted the cpp-compat branch September 17, 2023 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrap headers with extern "C" for C++ compatibility
2 participants