Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor regexp #381

Merged
merged 1 commit into from
Apr 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmake/AddLibArchive.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif()

find_package(LibArchive)
if (LibArchive_FOUND)
if (STATIC_LINK_FLAG MATCHES "(^-static )|( -static )|(^-static$)|( -static$)" AND NOT APPLE AND ${LibArchive_LIBRARIES} MATCHES ".*\.so$")
if (STATIC_LINK_FLAG MATCHES "(^| )-static($| )" AND NOT APPLE AND ${LibArchive_LIBRARIES} MATCHES ".*\.so$")
unset(LibArchive_LIBRARIES)
unset(LibArchive_LIBRARY CACHE)
find_library(LibArchive_LIBRARY
Expand All @@ -28,7 +28,7 @@ if (LibArchive_FOUND)

target_include_directories(${PROJECT_NAME} PRIVATE ${LibArchive_INCLUDE_DIR})
list(APPEND POAC_DEPENDENCIES ${LibArchive_LIBRARIES})
if (STATIC_LINK_FLAG MATCHES "(^-static )|( -static )|(^-static$)|( -static$)" AND NOT APPLE)
if (STATIC_LINK_FLAG MATCHES "(^| )-static($| )" AND NOT APPLE)
list(APPEND POAC_DEPENDENCIES acl)
list(APPEND POAC_DEPENDENCIES z)
endif ()
Expand Down
2 changes: 1 addition & 1 deletion cmake/AddOpenSSL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ endif ()

find_package(OpenSSL REQUIRED)
if (OPENSSL_FOUND)
if (STATIC_LINK_FLAG MATCHES "(^-static )|( -static )|(^-static$)|( -static$)" AND NOT APPLE)
if (STATIC_LINK_FLAG MATCHES "(^| )-static($| )" AND NOT APPLE)
foreach(x IN LISTS OPENSSL_LIBRARIES)
string(REGEX REPLACE "[.]so" ".a" x ${x})
list(APPEND OPENSSL_STATIC_LIBRARIES ${x})
Expand Down