Build Packaging : Set proper package name on Windows.
authorlazydodo <github@lazydodo.com>
Mon, 22 Aug 2016 14:15:03 +0000 (08:15 -0600)
committerlazydodo <github@lazydodo.com>
Mon, 22 Aug 2016 14:15:03 +0000 (08:15 -0600)
build_files/cmake/packaging.cmake

index afdbc644b4e2a75a364a90f543a9a10d1f98ac43..72f10bb57050c8e067d80faf366c7a757da05572 100644 (file)
@@ -38,7 +38,17 @@ unset(MY_WC_HASH)
 # Force Package Name
 execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE CPACK_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
 string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
-set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME_LOWER}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-git${CPACK_DATE}.${BUILD_REV}-${CMAKE_SYSTEM_PROCESSOR})
+if (MSVC)
+       if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+               set(PACKAGE_ARCH Win64)
+       else()
+               set(PACKAGE_ARCH Win32)
+       endif()
+else(MSVC)
+       set(PACKAGE_ARCH ${CMAKE_SYSTEM_PROCESSOR})
+endif()
+
+set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME_LOWER}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-git${CPACK_DATE}.${BUILD_REV}-${PACKAGE_ARCH})
 
 if(CMAKE_SYSTEM_NAME MATCHES "Linux")
        # RPM packages