forked from juzzlin/Heimer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstallWindows.cmake
34 lines (24 loc) · 1.27 KB
/
InstallWindows.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# **** Instal targets for Windows ****
function(setup_install_targets)
message(STATUS "Windows build.")
set(BIN_PATH .)
set(DOC_PATH .)
# Add target to copy files to the binary dir.
add_custom_target(docs ALL
COMMAND cmake -E copy ${CMAKE_SOURCE_DIR}/AUTHORS ${CMAKE_BINARY_DIR}/AUTHORS
COMMAND cmake -E copy ${CMAKE_SOURCE_DIR}/CHANGELOG ${CMAKE_BINARY_DIR}/CHANGELOG
COMMAND cmake -E copy ${CMAKE_SOURCE_DIR}/COPYING ${CMAKE_BINARY_DIR}/COPYING
COMMAND cmake -E copy ${CMAKE_SOURCE_DIR}/README.md ${CMAKE_BINARY_DIR}/README.md
DEPENDS ${BINARY_NAME})
# !! Note that currently this creates an installer that doesn't work.
# !! A statically linked Qt5 is assumed and that has problems with CMake.
# !! Use scripts/build-windows-installer instead.
install(PROGRAMS ${CMAKE_BINARY_DIR}/${BINARY_NAME}.exe DESTINATION ${BIN_PATH})
install(FILES AUTHORS CHANGELOG COPYING README.md DESTINATION ${DOC_PATH})
set(CPACK_PACKAGE_INSTALL_DIRECTORY Heimer)
set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/data/icons/heimer.ico)
set(CPACK_NSIS_MUI_UNIICON ${CMAKE_SOURCE_DIR}/data/icons/heimer.ico)
set(CPACK_NSIS_DISPLAY_NAME Heimer)
set(CPACK_NSIS_PACKAGE_NAME Heimer)
include(CPack)
endfunction()