Added CPack packaging and fix Linux compatibility.

- configure wrapper had bash syntax some places; replaced w/ sh syntax
- Added FindOpenSSL module.  The one that ships with CMake does not
  allow for specifying a non-standard location.
- datadir configure option changed to be relative to prefix.  This
  simplifies the packaging from having to consider absolute paths.
- Added macro for changing install_name of shared libs that need to
  ship with precompiled Bro for OS X.  This is only the optional
  libmagic and libGeoIP for now.
This commit is contained in:
Jon Siwek 2010-11-01 10:52:19 -05:00
parent 521c30e9ba
commit 737ce489a9
10 changed files with 302 additions and 41 deletions

View file

@ -0,0 +1,18 @@
# Sets CPACK_PACKAGE_FILE name in the following format:
#
# <project_name>-<version>-<OS/platform>-<arch>
#
# The version must already be set in the VERSION variable
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${CMAKE_SYSTEM_NAME}")
if (APPLE)
# Only Intel-based Macs are supported. CMAKE_SYSTEM_PROCESSOR may
# return the confusing 'i386' if running a 32-bit kernel, but chances
# are the binary is x86_64 (or more generally 'Intel') compatible.
set(arch "Intel")
else ()
set (arch ${CMAKE_SYSTEM_PROCESSOR})
endif ()
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${arch}")