-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CMake packaging for installation.
Add CMake config file (re2Config.cmake) for find_package(re2) - fixes finding Threads dependency Add CMake version file (re2ConfigVersion.cmake) - allows find_package(re2 <VERSION> ...) Change-Id: I6c1de1bfc59121085d70a277bd0821504b9d8736 Reviewed-on: https://code-review.googlesource.com/c/re2/+/59530 Reviewed-by: Andrei Bencsik <[email protected]> Reviewed-by: Paul Wankadia <[email protected]>
- Loading branch information
1 parent
d826d9f
commit cb5bbb2
Showing
2 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright 2022 The RE2 Authors. All Rights Reserved. | ||
# Use of this source code is governed by a BSD-style | ||
# license that can be found in the LICENSE file. | ||
|
||
@PACKAGE_INIT@ | ||
|
||
include(CMakeFindDependencyMacro) | ||
|
||
set_and_check(re2_INCLUDE_DIR ${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@) | ||
|
||
if(UNIX) | ||
set(THREADS_PREFER_PTHREAD_FLAG ON) | ||
find_dependency(Threads REQUIRED) | ||
endif() | ||
|
||
check_required_components(re2) | ||
|
||
if(TARGET re2::re2) | ||
return() | ||
endif() | ||
|
||
include(${CMAKE_CURRENT_LIST_DIR}/re2Targets.cmake) |