2019-08-15 06:30:42 +00:00
|
|
|
set(REGEX_LIBRARIES "" CACHE INTERNAL "")
|
|
|
|
|
2019-09-02 09:40:16 +00:00
|
|
|
if(WIN32 OR CYGWIN) # windows
|
2019-08-15 06:30:42 +00:00
|
|
|
|
|
|
|
set(REGEX_LIBRARIES regex CACHE INTERNAL "regex")
|
|
|
|
|
2019-09-02 09:40:16 +00:00
|
|
|
list(APPEND regex_SOURCES
|
2019-08-15 06:30:42 +00:00
|
|
|
# When building for Linux, we use regular expression
|
|
|
|
# functions supplied by the gnu C library.
|
|
|
|
# For the native WIN32 version, we need to use our own copy.
|
|
|
|
# These were copied from http://gnuwin32.sourceforge.net/packages/regex.htm
|
|
|
|
# Consider upgrading from https://www.gnu.org/software/libc/sources.html
|
|
|
|
${CUSTOM_REGEX_DIR}/regex.c
|
|
|
|
)
|
2019-09-02 09:40:16 +00:00
|
|
|
|
|
|
|
add_library(regex STATIC
|
2019-08-15 06:30:42 +00:00
|
|
|
${regex_SOURCES}
|
|
|
|
)
|
2019-09-02 09:40:16 +00:00
|
|
|
|
|
|
|
set_target_properties(regex
|
|
|
|
PROPERTIES COMPILE_FLAGS "-Dbool=int -Dtrue=1 -Dfalse=0 -DUSE_REGEX_STATIC"
|
|
|
|
)
|
|
|
|
|
2019-08-15 06:30:42 +00:00
|
|
|
endif()
|