summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorDRC <dcommander@users.sourceforge.net>2011-06-24 06:55:18 +0000
committerDRC <dcommander@users.sourceforge.net>2011-06-24 06:55:18 +0000
commit1a1840795d08d5382d0f2586829a3a50d10ad9c4 (patch)
tree712ad8929af6c7c51ca498972dcba2ab749c568e /cmake
parent94a803f0a055b39a6f279fca3b3542037e1899e2 (diff)
downloadtigervnc-1a1840795d08d5382d0f2586829a3a50d10ad9c4.tar.gz
tigervnc-1a1840795d08d5382d0f2586829a3a50d10ad9c4.zip
Deploy Mac TigerVNC Viewer as an application bundle instead of a package, and consolidate all of the installer scripts under release/ and cmake/
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4538 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'cmake')
-rw-r--r--cmake/BuildPackages.cmake76
1 files changed, 76 insertions, 0 deletions
diff --git a/cmake/BuildPackages.cmake b/cmake/BuildPackages.cmake
new file mode 100644
index 00000000..1493b5e3
--- /dev/null
+++ b/cmake/BuildPackages.cmake
@@ -0,0 +1,76 @@
+# This file is included from the top-level CMakeLists.txt. We just store it
+# here to avoid cluttering up that file.
+
+
+#
+# Windows installer (Inno Setup)
+#
+
+if(WIN32)
+
+if(CMAKE_SIZEOF_VOID_P MATCHES 8)
+ set(INST_NAME ${CMAKE_PROJECT_NAME}64-${VERSION})
+ set(INST_DEFS -DWIN64)
+else()
+ set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION})
+endif()
+
+if(MSVC_IDE)
+ set(INSTALLERDIR "$(OutDir)")
+ set(BUILDDIRDEF "-DBUILD_DIR=${INSTALLERDIR}\\")
+else()
+ set(INSTALLERDIR .)
+ set(BUILDDIRDEF "-DBUILD_DIR=")
+endif()
+
+set(INST_DEPS vncviewer)
+
+if(BUILD_WINVNC)
+ set(INST_DEFS ${INST_DEFS} -DBUILD_WINVNC)
+ set(INST_DEPS ${INST_DEPS} winvnc4 wm_hooks vncconfig)
+endif()
+
+if(GNUTLS_FOUND)
+ set(INST_DEFS ${INST_DEFS} -DHAVE_GNUTLS)
+endif()
+
+configure_file(release/tigervnc.iss.in release/tigervnc.iss)
+
+add_custom_target(installer
+ iscc -o${INSTALLERDIR} ${INST_DEFS} ${BUILDDIRDEF} -F${INST_NAME}
+ release/tigervnc.iss
+ DEPENDS ${INST_DEPS}
+ SOURCES release/tigervnc.iss)
+
+endif() # WIN32
+
+
+#
+# Mac DMG
+#
+
+if(APPLE)
+
+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)
+
+add_custom_target(dmg sh release/makemacapp
+ DEPENDS vncviewer
+ SOURCES release/makemacapp)
+
+add_custom_target(udmg sh release/makemacapp universal
+ DEPENDS vncviewer
+ SOURCES release/makemacapp)
+
+endif() # APPLE
+
+
+#
+# Common
+#
+
+install(FILES ${CMAKE_SOURCE_DIR}/LICENCE.txt DESTINATION .)