diff --git a/CMakeLists.txt b/CMakeLists.txt index bb35761c..b95ae870 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,9 @@ if (NOT ${PROJECT_VERSION} VERSION_EQUAL "${CurrentBuild_MAJOR}.${CurrentBuild_M message (FATAL_ERROR "PROJECT_VERSION does not match to src/CurrentBuild.txt") endif() +include(GNUInstallDirs) +set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") + include(CheckIncludeFile) Check_Include_File(sys/auxv.h HAVE_SYS_AUXV) @@ -46,8 +49,11 @@ 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 -file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/postinst" "#!/bin/sh\nldconfig") -set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/postinst") + +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(CPACK_DEBIAN_PACKAGE_DEBUG ON) +endif() + set(CPACK_DEB_COMPONENT_INSTALL ON) set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 14ae73a4..6ed83ace 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,3 @@ -include(GNUInstallDirs) - # Creates wrapper scripts and installs them in the user's binaries directory, which is usually "/usr/local/bin". # This is required because symlinks use the folder they are in as working directory. macro(install_wrapper_script component target)