blob: dfb44e8c10f249f73ddce4582e9947dfdf1edeb6 [file] [log] [blame]
DRCd22efe42011-06-24 05:26:43 +00001# This file is included from the top-level CMakeLists.txt. We just store it
2# here to avoid cluttering up that file.
3
Pierre Ossman69314c72011-03-08 12:18:13 +00004# Detect a 64-bit build and give that installer a different name
5if(CMAKE_SIZEOF_VOID_P MATCHES 8)
Pierre Ossman481b03e2011-03-03 12:32:15 +00006 set(INST_NAME ${CMAKE_PROJECT_NAME}64-${VERSION})
7 set(INST_DEFS -DWIN64)
8else()
9 set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION})
10endif()
11
12if(MSVC_IDE)
13 set(INSTALLERDIR "$(OutDir)")
14 set(BUILDDIRDEF "-DBUILD_DIR=${INSTALLERDIR}\\")
15else()
16 set(INSTALLERDIR .)
17 set(BUILDDIRDEF "-DBUILD_DIR=")
18endif()
19
20set(INST_DEPS vncviewer)
21
22if(BUILD_WINVNC)
23 set(INST_DEFS ${INST_DEFS} -DBUILD_WINVNC)
24 set(INST_DEPS ${INST_DEPS} winvnc4 wm_hooks vncconfig)
25endif()
26
Adam Tkacf586b842011-04-27 11:20:18 +000027if(GNUTLS_FOUND)
28 set(INST_DEFS ${INST_DEFS} -DHAVE_GNUTLS)
Adam Tkaced2ab6d2011-04-27 11:07:57 +000029endif()
30
DRCd22efe42011-06-24 05:26:43 +000031configure_file(win/installer/tigervnc.iss.in tigervnc.iss)
Pierre Ossman481b03e2011-03-03 12:32:15 +000032
33add_custom_target(installer
34 iscc -o${INSTALLERDIR} ${INST_DEFS} ${BUILDDIRDEF} -F${INST_NAME} tigervnc.iss
35 DEPENDS ${INST_DEPS}
36 SOURCES tigervnc.iss)
37
38install(FILES ${CMAKE_SOURCE_DIR}/win/README_BINARY.txt
39 ${CMAKE_SOURCE_DIR}/LICENCE.txt DESTINATION .)