relic-toolkit / relic

Code
Other
452 stars 179 forks source link

Headers C++ compat #273

Closed kassane closed 11 months ago

kassane commented 11 months ago

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
)