mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 09:08:37 +02:00
use backslashes for header image path on win
This commit is contained in:
parent
d34c3bdc1c
commit
92c221620c
2 changed files with 23 additions and 1 deletions
16
cmake/macros/FixPathForNSIS.cmake
Normal file
16
cmake/macros/FixPathForNSIS.cmake
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#
|
||||||
|
# FixPathForNSIS.cmake
|
||||||
|
#
|
||||||
|
# Created by Sam Gateau on 1/14/16.
|
||||||
|
# Copyright 2016 High Fidelity, Inc.
|
||||||
|
#
|
||||||
|
# Distributed under the Apache License, Version 2.0.
|
||||||
|
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
#
|
||||||
|
|
||||||
|
macro(fix_path_for_nsis INITIAL_PATH RESULTING_PATH)
|
||||||
|
# replace forward slash with backslash
|
||||||
|
string(REPLACE "/" "\\\\" _BACKSLASHED_PATH ${INITIAL_PATH})
|
||||||
|
# set the resulting path variable
|
||||||
|
set(${RESULTING_PATH} ${_BACKSLASHED_PATH})
|
||||||
|
endmacro()
|
|
@ -24,7 +24,13 @@ macro(GENERATE_INSTALLERS)
|
||||||
set(CPACK_NSIS_PACKAGE_NAME ${_DISPLAY_NAME})
|
set(CPACK_NSIS_PACKAGE_NAME ${_DISPLAY_NAME})
|
||||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${_DISPLAY_NAME})
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${_DISPLAY_NAME})
|
||||||
set(CPACK_NSIS_MUI_ICON "${HF_CMAKE_DIR}/installer/installer.ico")
|
set(CPACK_NSIS_MUI_ICON "${HF_CMAKE_DIR}/installer/installer.ico")
|
||||||
set(INSTALLER_HEADER_IMAGE "${HF_CMAKE_DIR}/installer/installer-header.bmp")
|
|
||||||
|
if (WIN32)
|
||||||
|
# use macro to put backslashes in header image path since nsis requires them
|
||||||
|
set(_INSTALLER_HEADER_BAD_PATH "${HF_CMAKE_DIR}/installer/installer-header.bmp")
|
||||||
|
set(INSTALLER_HEADER_IMAGE "")
|
||||||
|
fix_path_for_nsis(${_INSTALLER_HEADER_BAD_PATH} INSTALLER_HEADER_IMAGE)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
|
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue