Skip to content

Commit

Permalink
Merge pull request #381 from wx257osn2/better-regexp
Browse files Browse the repository at this point in the history
Refactor regexp
  • Loading branch information
ken-matsui committed Apr 13, 2021
2 parents 147f055 + cdd4e28 commit e450302
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit e450302

Please sign in to comment.