if(NOT CPACK_GENERATOR)
    list(APPEND CPACK_GENERATOR TGZ)
endif()

set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})

list(FIND CPACK_GENERATOR "RPM" rpm_format)
if(rpm_format GREATER_EQUAL 0)
    set(CPACK_RPM_PARSER_PACKAGE_REQUIRES "moloch == 2.0.0")
    set(CPACK_RPM_PLUGIN_PACKAGE_REQUIRES "moloch == 2.0.0")
endif()
