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 | |
DRC | 1a18407 | 2011-06-24 06:55:18 +0000 | [diff] [blame] | 18 | set(INST_DEPS vncviewer) |
| 19 | |
| 20 | if(BUILD_WINVNC) |
| 21 | set(INST_DEFS ${INST_DEFS} -DBUILD_WINVNC) |
DRC | e4f7c77 | 2011-11-08 08:58:19 +0000 | [diff] [blame^] | 22 | if(BUILD_JAVA) |
| 23 | set(INST_DEPS ${INST_DEPS} java) |
| 24 | endif() |
DRC | 1a18407 | 2011-06-24 06:55:18 +0000 | [diff] [blame] | 25 | set(INST_DEPS ${INST_DEPS} winvnc4 wm_hooks vncconfig) |
| 26 | endif() |
| 27 | |
| 28 | if(GNUTLS_FOUND) |
| 29 | set(INST_DEFS ${INST_DEFS} -DHAVE_GNUTLS) |
| 30 | endif() |
| 31 | |
| 32 | configure_file(release/tigervnc.iss.in release/tigervnc.iss) |
| 33 | |
| 34 | add_custom_target(installer |
DRC | c67db65 | 2011-11-08 08:51:04 +0000 | [diff] [blame] | 35 | iscc -o. ${INST_DEFS} -F${INST_NAME} release/tigervnc.iss |
DRC | 1a18407 | 2011-06-24 06:55:18 +0000 | [diff] [blame] | 36 | DEPENDS ${INST_DEPS} |
| 37 | SOURCES release/tigervnc.iss) |
| 38 | |
| 39 | endif() # WIN32 |
| 40 | |
| 41 | |
| 42 | # |
| 43 | # Mac DMG |
| 44 | # |
| 45 | |
| 46 | if(APPLE) |
| 47 | |
| 48 | set(DEFAULT_OSX_X86_BUILD ${CMAKE_SOURCE_DIR}/osxx86) |
| 49 | set(OSX_X86_BUILD ${DEFAULT_OSX_X86_BUILD} CACHE PATH |
| 50 | "Directory containing 32-bit OS X build to include in universal binaries (default: ${DEFAULT_OSX_X86_BUILD})") |
| 51 | |
| 52 | configure_file(release/makemacapp.in release/makemacapp) |
| 53 | configure_file(release/Info.plist.in release/Info.plist) |
| 54 | |
| 55 | add_custom_target(dmg sh release/makemacapp |
| 56 | DEPENDS vncviewer |
| 57 | SOURCES release/makemacapp) |
| 58 | |
| 59 | add_custom_target(udmg sh release/makemacapp universal |
| 60 | DEPENDS vncviewer |
| 61 | SOURCES release/makemacapp) |
| 62 | |
| 63 | endif() # APPLE |
| 64 | |
| 65 | |
| 66 | # |
DRC | c377ebd | 2011-06-25 08:48:19 +0000 | [diff] [blame] | 67 | # Binary tarball |
| 68 | # |
| 69 | |
| 70 | if(UNIX) |
| 71 | |
| 72 | configure_file(release/maketarball.in release/maketarball) |
| 73 | |
DRC | 7636ad0 | 2011-10-04 04:03:34 +0000 | [diff] [blame] | 74 | set(TARBALL_DEPENDS vncviewer vncpasswd vncconfig) |
| 75 | if(BUILD_JAVA) |
| 76 | set(TARBALL_DEPENDS ${TARBALL_DEPENDS} java) |
| 77 | endif() |
| 78 | |
DRC | c377ebd | 2011-06-25 08:48:19 +0000 | [diff] [blame] | 79 | add_custom_target(tarball sh release/maketarball |
DRC | 7636ad0 | 2011-10-04 04:03:34 +0000 | [diff] [blame] | 80 | DEPENDS ${TARBALL_DEPENDS} |
DRC | c377ebd | 2011-06-25 08:48:19 +0000 | [diff] [blame] | 81 | SOURCES release/maketarball) |
| 82 | |
| 83 | add_custom_target(servertarball sh release/maketarball server |
DRC | 7636ad0 | 2011-10-04 04:03:34 +0000 | [diff] [blame] | 84 | DEPENDS ${TARBALL_DEPENDS} |
DRC | c377ebd | 2011-06-25 08:48:19 +0000 | [diff] [blame] | 85 | SOURCES release/maketarball) |
| 86 | |
| 87 | endif() #UNIX |
| 88 | |
| 89 | # |
DRC | 1a18407 | 2011-06-24 06:55:18 +0000 | [diff] [blame] | 90 | # Common |
| 91 | # |
| 92 | |
DRC | c377ebd | 2011-06-25 08:48:19 +0000 | [diff] [blame] | 93 | install(FILES ${CMAKE_SOURCE_DIR}/LICENCE.TXT DESTINATION doc) |
DRC | e72b805 | 2011-06-28 03:02:38 +0000 | [diff] [blame] | 94 | install(FILES ${CMAKE_SOURCE_DIR}/README.txt DESTINATION doc) |