Also modify the windows package name.

This commit is contained in:
Username404-59 2021-03-12 22:16:11 +01:00
parent 2f751b1f01
commit 5f2b486c10
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 3 additions and 2 deletions

View File

@ -62,11 +62,12 @@ add_executable(ybcon src/main.cpp ${CMAKE_CURRENT_BINARY_DIR}/processed/Yerbacon
target_compile_definitions(ybcon PRIVATE YBCON_VERSION="${CODENAME} ${PROJECT_VERSION}")
# lpkg = linux package, wpkg = windows package
set(PNAME ${PROJECT_NAME}-${CODENAME}-${TIME})
if (UNIX AND NOT MINGW)
include(GNUInstallDirs)
set(CMAKE_INSTALL_PREFIX "/opt")
set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CODENAME}-${TIME}_lpkg")
set(CPACK_PACKAGE_FILE_NAME "${PNAME}_lpkg")
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/scripts/postinst.sh")
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE ${CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA})
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.14), libstdc++6 (>= 9)")
@ -99,7 +100,7 @@ if (UNIX AND NOT MINGW)
endif()
elseif(MINGW OR MSVC)
set(CMAKE_EXE_LINKER_FLAGS "-static -static-libstdc++ ${CMAKE_EXE_LINKER_FLAGS}")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}_wpkg")
set(CPACK_PACKAGE_FILE_NAME "${PNAME}_wpkg")
set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resources/Yerbacon.ico")
set(CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}/resources/Yerbacon.ico")
set(CPACK_NSIS_DEFINES "RequestExecutionLevel highest")