-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to use newer cmake and for Wine/MSYS2
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 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,49 @@ | ||
# - Try to find the Regex library | ||
# | ||
# Once done this will define | ||
# | ||
# REGEX_FOUND - system has libregex | ||
# REGEX_INCLUDE_DIR - the libregex include directory | ||
# REGEX_LIBRARIES - Link these to use libregex | ||
# | ||
# Copyright (c) 2018, Gilles Caulier, <caulier dot gilles at gmail dot com> | ||
# | ||
# Redistribution and use is allowed according to the terms of the BSD license. | ||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. | ||
|
||
if ( NOT MSVC AND NOT MINGW AND NOT MSYS ) | ||
find_path(Regex_INCLUDE_DIR | ||
NAMES regex.h | ||
DOC "libregex include directory" | ||
) | ||
|
||
mark_as_advanced(Regex_INCLUDE_DIR) | ||
|
||
find_library(Regex_LIBRARY "regex" | ||
DOC "libregex libraries" | ||
) | ||
|
||
mark_as_advanced(Regex_LIBRARY) | ||
|
||
find_package_handle_standard_args(Regex | ||
FOUND_VAR Regex_FOUND | ||
REQUIRED_VARS Regex_INCLUDE_DIR | ||
FAIL_MESSAGE "Failed to find libregex" | ||
) | ||
|
||
if(REGEX_FOUND) | ||
|
||
set(REGEX_INCLUDE_DIRS ${Regex_INCLUDE_DIRS}) | ||
|
||
if(Regex_LIBRARY) | ||
|
||
set(REGEX_LIBRARIES ${Regex_LIBRARY}) | ||
|
||
else() | ||
|
||
unset(REGEX_LIBRARIES) | ||
|
||
endif() | ||
|
||
endif() | ||
endif() |