Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
G
gflags
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
gflags
Commits
d6995590
Commit
d6995590
authored
Mar 20, 2014
by
Andreas Schuh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix architecture used for RPM packages and DEB/RPM package file names.
parent
04a30c86
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
29 deletions
+28
-29
CMakeLists.txt
CMakeLists.txt
+21
-5
package.cmake.in
cmake/package.cmake.in
+7
-24
No files found.
CMakeLists.txt
View file @
d6995590
...
...
@@ -366,15 +366,31 @@ if (BUILD_PACKAGING)
set
(
CPACK_RESOURCE_FILE_README
"
${
CMAKE_CURRENT_LIST_DIR
}
/cmake/README_runtime.txt"
)
endif
()
# system
name used for binary package file nam
e
# system
/architectur
e
if
(
WINDOWS
)
if
(
CMAKE_CL_64
)
set
(
CPACK_SYSTEM_NAME
"win64"
)
else
()
set
(
CPACK_SYSTEM_NAME
"win32"
)
endif
()
set
(
CPACK_PACKAGE_ARCHITECTURE
)
else
()
string
(
TOLOWER
"
${
CMAKE_SYSTEM_NAME
}
"
CPACK_SYSTEM_NAME
)
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
()
# source package settings
...
...
@@ -383,10 +399,10 @@ if (BUILD_PACKAGING)
set
(
CPACK_SOURCE_IGNORE_FILES
"/
\\\\
.git/;
\\\\
.swp$;
\\\\
.#;/#;
\\\\
.*~;cscope
\\\\
.*;/[Bb]uild[.+-_a-zA-Z0-9]*/"
)
# default binary package settings
set
(
CPACK_INCLUDE_TOPLEVEL_DIRECTORY
TRUE
)
set
(
CPACK_PACKAGE_FILE_NAME
"
${
CPACK_PACKAGE_NAME
}
-
${
CPACK_PACKAGE_VERSION
}
-
${
CPACK_SYSTEM_NAME
}
"
)
if
(
C
MAKE_SYSTEM_PROCESSOR
)
set
(
CPACK_PACKAGE_FILE_NAME
"
${
CPACK_PACKAGE_FILE_NAME
}
-
${
CMAKE_SYSTEM_PROCESSOR
}
"
)
set
(
CPACK_INCLUDE_TOPLEVEL_DIRECTORY TRUE
)
set
(
CPACK_PACKAGE_FILE_NAME
"
${
CPACK_PACKAGE_NAME
}
-
${
CPACK_PACKAGE_VERSION
}
-
${
CPACK_SYSTEM_NAME
}
"
)
if
(
C
PACK_PACKAGE_ARCHITECTURE
)
set
(
CPACK_PACKAGE_FILE_NAME
"
${
CPACK_PACKAGE_FILE_NAME
}
-
${
CPACK_PACKAGE_ARCHITECTURE
}
"
)
endif
()
# generator specific configuration file
...
...
cmake/package.cmake.in
View file @
d6995590
...
...
@@ -27,40 +27,23 @@ elseif (CPACK_GENERATOR MATCHES "DEB")
else ()
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}0")
endif ()
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}_${CPACK_PACKAGE_VERSION}-1_${CMAKE_SYSTEM_PROCESSOR}")
execute_process (
COMMAND dpkg --print-architecture
RESULT_VARIABLE RV
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
)
if (NOT RV EQUAL 0)
set (CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
endif ()
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}_${CPACK_PACKAGE_VERSION}-1_${CPACK_PACKAGE_ARCHITECTURE}")
set (CPACK_DEBIAN_PACKAGE_DEPENDS)
set (CPACK_DEBIAN_PACKAGE_SECTION "devel")
set (CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set (CPACK_DEBIAN_PACKAGE_HOMEPAGE "${CPACK_RPM_PACKAGE_URL}")
set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_VENDOR}")
set (CPACK_DEBIAN_PACKAGE_SECTION "devel")
set (CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set (CPACK_DEBIAN_PACKAGE_HOMEPAGE "${CPACK_RPM_PACKAGE_URL}")
set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_VENDOR}")
set (CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${CPACK_PACKAGE_ARCHITECTURE}")
# ------------------------------------------------------------------------------
# RPM package
elseif (CPACK_GENERATOR MATCHES "RPM")
execute_process (
COMMAND dpkg --print-architecture
RESULT_VARIABLE RV
OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
)
if (NOT RV EQUAL 0)
set (CPACK_RPM_PACKAGE_ARCHITECTURE i386)
endif ()
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
if (DEVEL)
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-devel")
endif ()
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${CPACK_PACKAGE_VERSION}-1
_${CMAKE_SYSTEM_PROCESSOR
}")
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${CPACK_PACKAGE_VERSION}-1
.${CPACK_PACKAGE_ARCHITECTURE
}")
endif ()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment