Skip to content

Commit

Permalink
fix build: fix grpc and userver re2 conflict
Browse files Browse the repository at this point in the history
------------------------
Note: by creating a PR or an issue you automatically agree to the CLA. See [CONTRIBUTING.md](https://github.com/userver-framework/userver/blob/develop/CONTRIBUTING.md). Feel free to remove this note, the agreement holds.

Tests: протестировано CI

Pull Request resolved: #831
commit_hash:71d092c0ea54a1cf2e859ef448000817f2308a30
  • Loading branch information
fdr400 committed Jan 16, 2025
1 parent 6272829 commit 31cd7c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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

0 comments on commit 31cd7c1

Please sign in to comment.