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

Use CMake variables for shared/static library suffixes #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
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
Loading