blob: 917813038e3f48bd3f0c9885915ef2caa07b865b [file] [log] [blame]
Pierre Ossman69314c72011-03-08 12:18:13 +00001# Detect a 64-bit build and give that installer a different name
2if(CMAKE_SIZEOF_VOID_P MATCHES 8)
Pierre Ossman481b03e2011-03-03 12:32:15 +00003 set(INST_NAME ${CMAKE_PROJECT_NAME}64-${VERSION})
4 set(INST_DEFS -DWIN64)
5else()
6 set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION})
7endif()
8
9if(MSVC_IDE)
10 set(INSTALLERDIR "$(OutDir)")
11 set(BUILDDIRDEF "-DBUILD_DIR=${INSTALLERDIR}\\")
12else()
13 set(INSTALLERDIR .)
14 set(BUILDDIRDEF "-DBUILD_DIR=")
15endif()
16
17set(INST_DEPS vncviewer)
18
19if(BUILD_WINVNC)
20 set(INST_DEFS ${INST_DEFS} -DBUILD_WINVNC)
21 set(INST_DEPS ${INST_DEPS} winvnc4 wm_hooks vncconfig)
22endif()
23
Adam Tkaced2ab6d2011-04-27 11:07:57 +000024if(GNUTLS_FOUND AND NOT GNUTLS_STATIC)
25 set(INST_DEFS ${INST_DEFS})
26endif()
27
Pierre Ossman481b03e2011-03-03 12:32:15 +000028configure_file(tigervnc.iss.in tigervnc.iss)
29
30add_custom_target(installer
31 iscc -o${INSTALLERDIR} ${INST_DEFS} ${BUILDDIRDEF} -F${INST_NAME} tigervnc.iss
32 DEPENDS ${INST_DEPS}
33 SOURCES tigervnc.iss)
34
35install(FILES ${CMAKE_SOURCE_DIR}/win/README_BINARY.txt
36 ${CMAKE_SOURCE_DIR}/LICENCE.txt DESTINATION .)