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

fix build: fix grpc and userver re2 conflict #831

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmake/modules/Findre2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ _userver_module_find_library(
)

_userver_module_end()

if(NOT TARGET re2::re2)
add_library(re2::re2 ALIAS re2)
endif()
3 changes: 1 addition & 2 deletions universal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,10 @@ option(USERVER_FEATURE_RE2 "Build userver with re2 support" OFF)
if(USERVER_FEATURE_RE2)
if(USERVER_CONAN)
find_package(re2 REQUIRED CONFIG)
target_link_libraries(${PROJECT_NAME} PRIVATE re2::re2)
else()
find_package(re2 REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE re2)
endif()
target_link_libraries(${PROJECT_NAME} PRIVATE re2::re2)
else()
target_compile_definitions(${PROJECT_NAME} PUBLIC USERVER_NO_RE2_SUPPORT=1)
endif()
Expand Down
Loading