DRC | 1a18407 | 2011-06-24 06:55:18 +0000 | [diff] [blame] | 1 | # This file is included from the top-level CMakeLists.txt. We just store it |
| 2 | # here to avoid cluttering up that file. |
| 3 | |
| 4 | |
| 5 | # |
| 6 | # Windows installer (Inno Setup) |
| 7 | # |
| 8 | |
| 9 | if(WIN32) |
| 10 | |
| 11 | if(CMAKE_SIZEOF_VOID_P MATCHES 8) |
| 12 | set(INST_NAME ${CMAKE_PROJECT_NAME}64-${VERSION}) |
| 13 | set(INST_DEFS -DWIN64) |
| 14 | else() |
| 15 | set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}) |
| 16 | endif() |
| 17 | |
| 18 | if(MSVC_IDE) |
| 19 | set(INSTALLERDIR "$(OutDir)") |
| 20 | set(BUILDDIRDEF "-DBUILD_DIR=${INSTALLERDIR}\\") |
| 21 | else() |
| 22 | set(INSTALLERDIR .) |
| 23 | set(BUILDDIRDEF "-DBUILD_DIR=") |
| 24 | endif() |
| 25 | |
| 26 | set(INST_DEPS vncviewer) |
| 27 | |
| 28 | if(BUILD_WINVNC) |
| 29 | set(INST_DEFS ${INST_DEFS} -DBUILD_WINVNC) |
| 30 | set(INST_DEPS ${INST_DEPS} winvnc4 wm_hooks vncconfig) |
| 31 | endif() |
| 32 | |
| 33 | if(GNUTLS_FOUND) |
| 34 | set(INST_DEFS ${INST_DEFS} -DHAVE_GNUTLS) |
| 35 | endif() |
| 36 | |
| 37 | configure_file(release/tigervnc.iss.in release/tigervnc.iss) |
| 38 | |
| 39 | add_custom_target(installer |
| 40 | iscc -o${INSTALLERDIR} ${INST_DEFS} ${BUILDDIRDEF} -F${INST_NAME} |
| 41 | release/tigervnc.iss |
| 42 | DEPENDS ${INST_DEPS} |
| 43 | SOURCES release/tigervnc.iss) |
| 44 | |
| 45 | endif() # WIN32 |
| 46 | |
| 47 | |
| 48 | # |
| 49 | # Mac DMG |
| 50 | # |
| 51 | |
| 52 | if(APPLE) |
| 53 | |
| 54 | set(DEFAULT_OSX_X86_BUILD ${CMAKE_SOURCE_DIR}/osxx86) |
| 55 | set(OSX_X86_BUILD ${DEFAULT_OSX_X86_BUILD} CACHE PATH |
| 56 | "Directory containing 32-bit OS X build to include in universal binaries (default: ${DEFAULT_OSX_X86_BUILD})") |
| 57 | |
| 58 | configure_file(release/makemacapp.in release/makemacapp) |
| 59 | configure_file(release/Info.plist.in release/Info.plist) |
| 60 | |
| 61 | add_custom_target(dmg sh release/makemacapp |
| 62 | DEPENDS vncviewer |
| 63 | SOURCES release/makemacapp) |
| 64 | |
| 65 | add_custom_target(udmg sh release/makemacapp universal |
| 66 | DEPENDS vncviewer |
| 67 | SOURCES release/makemacapp) |
| 68 | |
| 69 | endif() # APPLE |
| 70 | |
| 71 | |
| 72 | # |
DRC | c377ebd | 2011-06-25 08:48:19 +0000 | [diff] [blame^] | 73 | # Binary tarball |
| 74 | # |
| 75 | |
| 76 | if(UNIX) |
| 77 | |
| 78 | configure_file(release/maketarball.in release/maketarball) |
| 79 | |
| 80 | add_custom_target(tarball sh release/maketarball |
| 81 | DEPENDS vncviewer vncpasswd vncconfig |
| 82 | SOURCES release/maketarball) |
| 83 | |
| 84 | add_custom_target(servertarball sh release/maketarball server |
| 85 | DEPENDS vncviewer vncpasswd vncconfig |
| 86 | SOURCES release/maketarball) |
| 87 | |
| 88 | endif() #UNIX |
| 89 | |
| 90 | # |
DRC | 1a18407 | 2011-06-24 06:55:18 +0000 | [diff] [blame] | 91 | # Common |
| 92 | # |
| 93 | |
DRC | c377ebd | 2011-06-25 08:48:19 +0000 | [diff] [blame^] | 94 | install(FILES ${CMAKE_SOURCE_DIR}/LICENCE.TXT DESTINATION doc) |