Set CPACK_PACKAGING_INSTALL_PREFIX to the install prefix for windows installers.

This commit is contained in:
Username404 2021-03-13 18:59:15 +01:00
parent 699c406e30
commit b60cadecd1
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 2 additions and 1 deletions

View File

@ -100,6 +100,8 @@ if (UNIX AND NOT MINGW)
DESTINATION yerbacon/${CMAKE_INSTALL_BINDIR}) DESTINATION yerbacon/${CMAKE_INSTALL_BINDIR})
endif() endif()
elseif(MINGW OR MSVC) elseif(MINGW OR MSVC)
set(CMAKE_INSTALL_PREFIX "C:\\progs\\${PROJECT_NAME}")
set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
set(CMAKE_EXE_LINKER_FLAGS "-static -static-libstdc++ ${CMAKE_EXE_LINKER_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "-static -static-libstdc++ ${CMAKE_EXE_LINKER_FLAGS}")
set(CPACK_PACKAGE_FILE_NAME "${PNAME}_wpkg") set(CPACK_PACKAGE_FILE_NAME "${PNAME}_wpkg")
set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resources/${PROJECT_NAME}.ico") set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resources/${PROJECT_NAME}.ico")
@ -110,7 +112,6 @@ elseif(MINGW OR MSVC)
set(CPACK_NSIS_MODIFY_PATH ON) set(CPACK_NSIS_MODIFY_PATH ON)
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
set(CPACK_GENERATOR ZIP;NSIS) set(CPACK_GENERATOR ZIP;NSIS)
set(CMAKE_INSTALL_PREFIX "C:\\progs\\${PROJECT_NAME}")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ybcon.exe DESTINATION bin) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ybcon.exe DESTINATION bin)
endif() endif()
include(CPack) include(CPack)