Set CPACK_PACKAGING_INSTALL_PREFIX to the install prefix for windows installers.
This commit is contained in:
parent
699c406e30
commit
b60cadecd1
|
@ -100,6 +100,8 @@ if (UNIX AND NOT MINGW)
|
|||
DESTINATION yerbacon/${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
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(CPACK_PACKAGE_FILE_NAME "${PNAME}_wpkg")
|
||||
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_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
|
||||
set(CPACK_GENERATOR ZIP;NSIS)
|
||||
set(CMAKE_INSTALL_PREFIX "C:\\progs\\${PROJECT_NAME}")
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ybcon.exe DESTINATION bin)
|
||||
endif()
|
||||
include(CPack)
|
Loading…
Reference in New Issue