diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2022-01-26 11:23:20 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-01-27 10:53:02 +0100 |
commit | 4d74bac8bc8c14c2b217391b3b8860f3dc701202 (patch) | |
tree | 10b941608eeef24d5ea5256f55e19163da6ab9a1 /cmake | |
parent | a73acf6c068a39d0bb9437e05b0b60a87e46bba8 (diff) | |
download | mariadb-git-4d74bac8bc8c14c2b217391b3b8860f3dc701202.tar.gz |
new pcre fixup - they renamed static libraries, again.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/pcre.cmake | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/cmake/pcre.cmake b/cmake/pcre.cmake index 7e0d23d45b0..b0c6b81e630 100644 --- a/cmake/pcre.cmake +++ b/cmake/pcre.cmake @@ -19,12 +19,21 @@ MACRO(BUNDLE_PCRE2) SET(intdir) ENDIF() - SET(file ${dir}/src/pcre2-build/${intdir}${CMAKE_STATIC_LIBRARY_PREFIX}${lib}-static${CMAKE_STATIC_LIBRARY_SUFFIX}) + # PCRE names static libraries differently depending on platform. + # On Windows, but not elsewhere, it adds "-static" to the library name, + # or "-staticd". + IF(WIN32) + SET(PCRE_STATIC "-static") + ELSE() + SET(PCRE_STATIC "") + ENDIF() + + SET(file ${dir}/src/pcre2-build/${intdir}${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${PCRE_STATIC}${CMAKE_STATIC_LIBRARY_SUFFIX}) IF(WIN32) # Debug libary name. # Same condition as in pcre2 CMakeLists.txt that adds "d" - SET(file_d ${dir}/src/pcre2-build/${intdir}${CMAKE_STATIC_LIBRARY_PREFIX}${lib}-staticd${CMAKE_STATIC_LIBRARY_SUFFIX}) + SET(file_d ${dir}/src/pcre2-build/${intdir}${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${PCRE_STATIC}d${CMAKE_STATIC_LIBRARY_SUFFIX}) SET_TARGET_PROPERTIES(${lib} PROPERTIES IMPORTED_LOCATION_DEBUG ${file_d}) ELSE() SET(file_d) |