mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Prefer static libraries for some dependencies on OS X
This makes binary packaging easier because OS X doesn't ship with all the shared libraries we may link against (libmagic and libGeoIP in this case)
This commit is contained in:
parent
b496d63632
commit
e1ebf81f76
2 changed files with 18 additions and 2 deletions
|
@ -21,8 +21,16 @@ find_path(LibGeoIP_ROOT_DIR
|
||||||
NAMES include/GeoIPCity.h
|
NAMES include/GeoIPCity.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
|
# the static version of the library is preferred on OS X for the
|
||||||
|
# purposes of making packages (libGeoIP doesn't ship w/ OS X)
|
||||||
|
set(libgeoip_names libGeoIp.a GeoIP)
|
||||||
|
else ()
|
||||||
|
set(libgeoip_names GeoIP)
|
||||||
|
endif ()
|
||||||
|
|
||||||
find_library(LibGeoIP_LIBRARY
|
find_library(LibGeoIP_LIBRARY
|
||||||
NAMES GeoIP
|
NAMES ${libgeoip_names}
|
||||||
HINTS ${LibGeoIP_ROOT_DIR}/lib
|
HINTS ${LibGeoIP_ROOT_DIR}/lib
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,16 @@ find_path(LibMagic_ROOT_DIR
|
||||||
NAMES include/magic.h
|
NAMES include/magic.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
|
# the static version of the library is preferred on OS X for the
|
||||||
|
# purposes of making packages (libmagic doesn't ship w/ OS X)
|
||||||
|
set(libmagic_names libmagic.a magic)
|
||||||
|
else ()
|
||||||
|
set(libmagic_names magic)
|
||||||
|
endif ()
|
||||||
|
|
||||||
find_library(LibMagic_LIBRARY
|
find_library(LibMagic_LIBRARY
|
||||||
NAMES magic
|
NAMES ${libmagic_names}
|
||||||
HINTS ${LibMagic_ROOT_DIR}/lib
|
HINTS ${LibMagic_ROOT_DIR}/lib
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue