From fdde72c820b9ff36e71f68845114dbc36c53dfc7 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 16 Jul 2020 13:38:01 +0200 Subject: [PATCH] Move release cmake stuff to release directory It's just confusing when this is split over two directories. --- CMakeLists.txt | 2 +- release/CMakeLists.txt | 28 ++++++++++++++-------------- release/makemacapp.in | 3 +++ release/maketarball.in | 3 +++ release/tigervnc.iss.in | 8 ++++---- 5 files changed, 25 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd454c6f..f85b4031 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -307,7 +307,7 @@ endif() add_subdirectory(tests) -include(cmake/BuildPackages.cmake) +add_subdirectory(release) # uninstall configure_file("${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" diff --git a/release/CMakeLists.txt b/release/CMakeLists.txt index 1f251929..b8477552 100644 --- a/release/CMakeLists.txt +++ b/release/CMakeLists.txt @@ -25,12 +25,12 @@ if(BUILD_WINVNC) set(INST_DEPS ${INST_DEPS} winvnc4 wm_hooks vncconfig) endif() -configure_file(release/tigervnc.iss.in release/tigervnc.iss) +configure_file(tigervnc.iss.in tigervnc.iss) add_custom_target(installer - iscc -o. ${INST_DEFS} -F${INST_NAME} release/tigervnc.iss + iscc -o. ${INST_DEFS} -F${INST_NAME} tigervnc.iss DEPENDS ${INST_DEPS} - SOURCES release/tigervnc.iss) + SOURCES tigervnc.iss) endif() # WIN32 @@ -45,16 +45,16 @@ set(DEFAULT_OSX_X86_BUILD ${CMAKE_SOURCE_DIR}/osxx86) set(OSX_X86_BUILD ${DEFAULT_OSX_X86_BUILD} CACHE PATH "Directory containing 32-bit OS X build to include in universal binaries (default: ${DEFAULT_OSX_X86_BUILD})") -configure_file(release/makemacapp.in release/makemacapp) -configure_file(release/Info.plist.in release/Info.plist) +configure_file(makemacapp.in makemacapp) +configure_file(Info.plist.in Info.plist) -add_custom_target(dmg sh release/makemacapp +add_custom_target(dmg sh makemacapp DEPENDS vncviewer - SOURCES release/makemacapp) + SOURCES makemacapp) -add_custom_target(udmg sh release/makemacapp universal +add_custom_target(udmg sh makemacapp universal DEPENDS vncviewer - SOURCES release/makemacapp) + SOURCES makemacapp) endif() # APPLE @@ -65,20 +65,20 @@ endif() # APPLE if(UNIX) -configure_file(release/maketarball.in release/maketarball) +configure_file(maketarball.in maketarball) set(TARBALL_DEPENDS vncviewer vncpasswd vncconfig) if(BUILD_JAVA) set(TARBALL_DEPENDS ${TARBALL_DEPENDS} java) endif() -add_custom_target(tarball sh release/maketarball +add_custom_target(tarball sh maketarball DEPENDS ${TARBALL_DEPENDS} - SOURCES release/maketarball) + SOURCES maketarball) -add_custom_target(servertarball sh release/maketarball server +add_custom_target(servertarball sh maketarball server DEPENDS ${TARBALL_DEPENDS} - SOURCES release/maketarball) + SOURCES maketarball) endif() #UNIX diff --git a/release/makemacapp.in b/release/makemacapp.in index 7aca33cc..2bfd869e 100644 --- a/release/makemacapp.in +++ b/release/makemacapp.in @@ -27,6 +27,7 @@ PACKAGE_NAME=TigerVNC VERSION=@VERSION@ BUILD=@BUILD@ SRCDIR=@CMAKE_SOURCE_DIR@ +BINDIR=@CMAKE_BINARY_DIR@ BUILDDIR32=@OSX_X86_BUILD@ if [ $# -gt 0 ]; then if [ "$1" = "universal" ]; then @@ -34,6 +35,8 @@ if [ $# -gt 0 ]; then fi fi +cd $BINDIR + if [ -f $PACKAGE_NAME.dmg ]; then rm -f $PACKAGE_NAME.dmg fi diff --git a/release/maketarball.in b/release/maketarball.in index 81d40e46..56618934 100644 --- a/release/maketarball.in +++ b/release/maketarball.in @@ -19,6 +19,7 @@ PACKAGE_NAME=@CMAKE_PROJECT_NAME@ VERSION=@VERSION@ BUILD=@BUILD@ SRCDIR=@CMAKE_SOURCE_DIR@ +BINDIR=@CMAKE_BINARY_DIR@ OS=@CMAKE_SYSTEM_NAME@ CPU=@CMAKE_SYSTEM_PROCESSOR@ PREFIX=@CMAKE_INSTALL_PREFIX@ @@ -35,6 +36,8 @@ if [ $# -gt 0 ]; then fi fi +cd $BINDIR + umask 022 TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX` rm -f $PACKAGE_FILE diff --git a/release/tigervnc.iss.in b/release/tigervnc.iss.in index 58501488..7292a80f 100644 --- a/release/tigervnc.iss.in +++ b/release/tigervnc.iss.in @@ -25,11 +25,11 @@ Name: "{sys}\config\systemprofile\Desktop" [Files] #ifdef BUILD_WINVNC -Source: "@CMAKE_CURRENT_BINARY_DIR@\win\winvnc\winvnc4.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace; -Source: "@CMAKE_CURRENT_BINARY_DIR@\win\wm_hooks\wm_hooks.dll"; DestDir: "{app}"; Flags: ignoreversion restartreplace; -Source: "@CMAKE_CURRENT_BINARY_DIR@\win\vncconfig\vncconfig.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace; +Source: "@CMAKE_BINARY_DIR@\win\winvnc\winvnc4.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace; +Source: "@CMAKE_BINARY_DIR@\win\wm_hooks\wm_hooks.dll"; DestDir: "{app}"; Flags: ignoreversion restartreplace; +Source: "@CMAKE_BINARY_DIR@\win\vncconfig\vncconfig.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace; #endif -Source: "@CMAKE_CURRENT_BINARY_DIR@\vncviewer\vncviewer.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace; +Source: "@CMAKE_BINARY_DIR@\vncviewer\vncviewer.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace; Source: "@CMAKE_SOURCE_DIR@\README.rst"; DestDir: "{app}"; Flags: ignoreversion Source: "@CMAKE_SOURCE_DIR@\LICENCE.TXT"; DestDir: "{app}"; Flags: ignoreversion -- 2.39.5