zeek/cmake/SetPackageGenerators.cmake
Jon Siwek 737ce489a9 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.
2010-11-17 20:38:35 -06:00

22 lines
741 B
CMake

# Sets the list of desired package types to be created by the make
# package target. A .tar.gz is always made, and depending on the
# operating system, more are added:
#
# Darwin - PackageMaker
# Linux - RPM if the platform has rpmbuild installed
# DEB is ommitted because CPack does not give enough
# control over how the package is created and lacks support
# for automatic dependency detection.
#
#
# CPACK_GENERATOR is set by this module
set(CPACK_GENERATOR TGZ)
if (APPLE)
list(APPEND CPACK_GENERATOR PackageMaker)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
find_program(RPMBUILD_EXE rpmbuild)
if (RPMBUILD_EXE)
set(CPACK_GENERATOR ${CPACK_GENERATOR} RPM)
endif ()
endif ()