2018-08-10 00:33:38 +03:00
cmake_minimum_required ( VERSION 3.6 )
2018-05-22 23:20:41 +03:00
2018-08-10 00:33:38 +03:00
project ( SoftEtherVPN
V E R S I O N 5 . 0 1 . 9 6 5 7
L A N G U A G E S C
)
2018-05-22 23:20:41 +03:00
set ( default_build_type "Release" )
2018-08-07 18:38:06 +03:00
# Check that submodules are present only if source was downloaded with git
if ( EXISTS "${SoftEtherVPN_SOURCE_DIR}/.git" AND NOT EXISTS "${SoftEtherVPN_SOURCE_DIR}/src/Mayaqua/cpu_features/CMakeLists.txt" )
message ( FATAL_ERROR "Submodules are not initialized. Run\n\tgit submodule update --init --recursive" )
endif ( )
2018-05-22 23:20:41 +03:00
add_subdirectory ( src )
2018-08-10 00:33:38 +03:00
# Packaging
set ( CPACK_GENERATOR "DEB" )
set ( CPACK_COMPONENTS_ALL vpnserver vpnclient vpnbridge vpncmd )
set ( CPACK_PACKAGE_DIRECTORY ${ SoftEtherVPN_SOURCE_DIR } /bin )
set ( CPACK_PACKAGE_VERSION ${ PROJECT_VERSION } )
set ( CPACK_PACKAGE_VENDOR "SoftEther" )
set ( CPACK_PACKAGE_NAME "softether" )
set ( CPACK_PACKAGE_DESCRIPTION_FILE "${SoftEtherVPN_SOURCE_DIR}/description" )
set ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "SoftEther VPN is an open-source cross-platform multi-protocol VPN program, created as an academic project in the University of Tsukuba." )
# DEB
set ( CPACK_DEB_COMPONENT_INSTALL ON )
set ( CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON )
set ( CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT" )
set ( CPACK_DEBIAN_PACKAGE_SECTION "net" )
set ( CPACK_DEBIAN_PACKAGE_MAINTAINER "Unknown" )
include ( CPack )