mirror of
https://github.com/gflags/gflags.git
synced 2025-04-05 05:25:04 +00:00
Set package architecture to i386 when compiling with -m32.
This commit is contained in:
parent
978c567d02
commit
cf40f73c40
1 changed files with 19 additions and 0 deletions
|
@ -375,6 +375,25 @@ if (BUILD_PACKAGING)
|
|||
endif ()
|
||||
else ()
|
||||
string (TOLOWER "${CMAKE_SYSTEM_NAME}" CPACK_SYSTEM_NAME)
|
||||
if (CMAKE_CXX_FLAGS MATCHES "-m32")
|
||||
set (CPACK_PACKAGE_ARCHITECTURE i386)
|
||||
else ()
|
||||
execute_process (
|
||||
COMMAND dpkg --print-architecture
|
||||
RESULT_VARIABLE RV
|
||||
OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE
|
||||
)
|
||||
if (RV EQUAL 0)
|
||||
string (STRIP "${CPACK_PACKAGE_ARCHITECTURE}" CPACK_PACKAGE_ARCHITECTURE)
|
||||
else ()
|
||||
execute_process (COMMAND uname -m OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE)
|
||||
if (CPACK_PACKAGE_ARCHITECTURE MATCHES "x86_64")
|
||||
set (CPACK_PACKAGE_ARCHITECTURE amd64)
|
||||
else ()
|
||||
set (CPACK_PACKAGE_ARCHITECTURE i386)
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# source package settings
|
||||
|
|
Loading…
Add table
Reference in a new issue