mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
Use PCRE2_STATIC for bundled regex linkage
This commit is contained in:
committed by
GitHub
parent
f84035e156
commit
f4acefaba4
@@ -55,6 +55,7 @@ elseif(USE_REGEX STREQUAL "regcomp")
|
||||
elseif(USE_REGEX STREQUAL "builtin")
|
||||
add_feature_info("Regular expressions" ON "using bundled implementation")
|
||||
set(GIT_REGEX_BUILTIN 1)
|
||||
add_definitions(-DPCRE2_STATIC)
|
||||
|
||||
add_subdirectory("${PROJECT_SOURCE_DIR}/deps/pcre2" "${PROJECT_BINARY_DIR}/deps/pcre2")
|
||||
list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${PROJECT_SOURCE_DIR}/deps/pcre2")
|
||||
|
||||
1
deps/pcre2/CMakeLists.txt
vendored
1
deps/pcre2/CMakeLists.txt
vendored
@@ -103,6 +103,7 @@ set(PCRE2POSIX_SOURCES pcre2posix.c)
|
||||
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
add_definitions(-DPCRE2_CODE_UNIT_WIDTH=8)
|
||||
add_definitions(-DPCRE2_STATIC)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_definitions(_CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS)
|
||||
|
||||
5
deps/pcre2/pcre2.h
vendored
5
deps/pcre2/pcre2.h
vendored
@@ -53,11 +53,6 @@ don't change existing definitions of PCRE2_EXP_DECL.
|
||||
|
||||
By default, we use the standard "extern" declarations. */
|
||||
|
||||
/* libgit2 uses pcre2 as an object library */
|
||||
#if defined(__MINGW32__)
|
||||
# define PCRE2_EXP_DECL
|
||||
#endif
|
||||
|
||||
#ifndef PCRE2_EXP_DECL
|
||||
# if defined(_WIN32) && !defined(PCRE2_STATIC)
|
||||
# define PCRE2_EXP_DECL extern __declspec(dllimport)
|
||||
|
||||
5
deps/pcre2/pcre2_internal.h
vendored
5
deps/pcre2/pcre2_internal.h
vendored
@@ -151,11 +151,6 @@ only if it is not already set. */
|
||||
#error This project uses C99. C++ is not supported.
|
||||
#endif
|
||||
|
||||
/* libgit2 uses pcre2 as an object library */
|
||||
#if defined(__MINGW32__)
|
||||
# define PCRE2_EXP_DECL
|
||||
#endif
|
||||
|
||||
#ifndef PCRE2_EXP_DECL
|
||||
# if defined(_WIN32) && !defined(PCRE2_STATIC)
|
||||
# define PCRE2_EXP_DECL extern __declspec(dllexport)
|
||||
|
||||
Reference in New Issue
Block a user