Skip to content

Commit

Permalink
Merge branch 'topic/timw/use-cmake-variables-for-library-name-suffixes'
Browse files Browse the repository at this point in the history
* topic/timw/use-cmake-variables-for-library-name-suffixes:
  Use CMake variables for shared/static library suffixes
  • Loading branch information
timwoj committed Dec 12, 2024
2 parents 725914b + d38f51d commit 0ae2977
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions FindCAres.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ if (NOT HAVE_CARES)
find_path(CARES_ROOT_DIR NAMES "include/ares.h")

# Prefer linking statically but look for a shared library version too.
find_library(CARES_LIBRARIES NAMES libcares_static.a libcares.so
HINTS ${CARES_ROOT_DIR}/lib)
find_library(
CARES_LIBRARIES NAMES "libcares_static${CMAKE_STATIC_LIBRARY_SUFFIX}"
"libcares${CMAKE_SHARED_LIBRARY_SUFFIX}"
HINTS ${CARES_ROOT_DIR}/lib)

find_path(CARES_INCLUDE_DIRS NAMES "ares.h" HINTS ${CARES_ROOT_DIR}/include)

Expand Down
6 changes: 4 additions & 2 deletions FindKqueue.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ if (NOT HAVE_KQUEUE)
find_path(LIBKQUEUE_ROOT_DIR NAMES "include/sys/event.h")

# Prefer linking statically but look for a shared library version too.
find_library(LIBKQUEUE_LIBRARIES NAMES libkqueue.a libkqueue.so
HINTS ${LIBKQUEUE_ROOT_DIR}/lib)
find_library(
LIBKQUEUE_LIBRARIES NAMES "libkqueue${CMAKE_STATIC_LIBRARY_SUFFIX}"
"libkqueue${CMAKE_SHARED_LIBRARY_SUFFIX}"
HINTS ${LIBKQUEUE_ROOT_DIR}/lib)

find_path(LIBKQUEUE_INCLUDE_DIRS NAMES "sys/event.h"
HINTS ${LIBKQUEUE_ROOT_DIR}/include/kqueue)
Expand Down

0 comments on commit 0ae2977

Please sign in to comment.