Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CTA-LAPP
PHOENIX_LIBS
PhoenixGraph
Commits
942f4504
Commit
942f4504
authored
Sep 19, 2020
by
Pierre Aubert
Browse files
Update create linux package
parent
7607ff06
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
39 deletions
+46
-39
CMakeLists.txt
CMakeLists.txt
+1
-0
cmake/CMakeLists.txt
cmake/CMakeLists.txt
+2
-0
cmake/createLinuxPackages.cmake
cmake/createLinuxPackages.cmake
+43
-39
No files found.
CMakeLists.txt
View file @
942f4504
...
...
@@ -22,4 +22,5 @@ endif(SELF_TESTS_MODE)
set
(
PHOENIX_INCLUDE_DIRS
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/src;
${
PHOENIX_INCLUDE_DIRS
}
"
CACHE INTERNAL
"list of Phoenix include dirs"
)
createLinuxPackages
()
cmake/CMakeLists.txt
View file @
942f4504
...
...
@@ -9,3 +9,5 @@ if(NOT MODULE_MODE)
include
(
create_find_project.cmake
)
endif
()
include
(
createLinuxPackages.cmake
)
cmake/createLinuxPackages.cmake
View file @
942f4504
# Commands to create debian package with cmake
set
(
CPACK_PACKAGE_NAME
"
${
PROGRAM_NAME
}
"
)
set
(
CPACK_PACKAGE_VERSION
"
${
PROGRAM_VERSION
}
"
)
set
(
CPACK_PACKAGE_VENDOR
"Pierre Aubert"
)
set
(
CPACK_PACKAGE_DESCRIPTION_SUMMARY
${
PROGRAM_DESCRIPTION_NO_QUOTE
}
)
set
(
CPACK_RESOURCE_FILE_README
${
CMAKE_SOURCE_DIR
}
/README.md
)
set
(
CPACK_RESOURCE_FILE_WELCOME
${
CMAKE_SOURCE_DIR
}
/README.md
)
set
(
CPACK_PACKAGE_HOMEPAGE_URL
${
PROGRAM_HOMEPAGE
}
)
set
(
CPACK_PACKAGE_CONTACT
"pierre.aubert@lapp.in2p3.fr"
)
set
(
CPACK_PACKAGE_ICON
${
CMAKE_SOURCE_DIR
}
/doc/icon.bmp
)
set
(
CPACK_PACKAGE_DESCRIPTION
${
PROGRAM_DESCRIPTION_NO_QUOTE
}
)
if
(
CREATE_DEB
)
#Ok for UBUNTU
set
(
CPACK_GENERATOR
"DEB"
)
set
(
CPACK_DEBIAN_PACKAGE_MAINTAINER
"pierre.aubert@lapp.in2p3.fr"
)
#required
set
(
CPACK_DEBIAN_PACKAGE_HOMEPAGE
${
PROGRAM_HOMEPAGE
}
)
#For the debian installer only
set
(
CPACK_DEBIAN_PACKAGE_DEPENDS
""
)
endif
(
CREATE_DEB
)
if
(
CREATE_RPM
)
#Need to install rmp package on ubuntu which contains rpmbuild
set
(
CPACK_GENERATOR
"RPM"
)
set
(
CPACK_RPM_PACKAGE_AUTOREQ
"NO"
)
set
(
CPACK_RPM_PACKAGE_REQUIRES
""
)
endif
(
CREATE_RPM
)
# if(CREATE_DMG) #We should use DragNDrop or PackageMaker of osx
# set(CPACK_GENERATOR "DMG")
# endif(CREATE_DMG)
include
(
CPack
)
# Has to be used :
# cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCREATE_DEB=yes -DSSE4.2=yes # Or whatever extension
# make -j 8
# cpack
function
(
createLinuxPackages
)
if
(
NOT MODULE_MODE
)
set
(
CPACK_PACKAGE_NAME
"
${
PROGRAM_NAME
}
"
CACHE STRING
"Name of the program"
)
set
(
CPACK_PACKAGE_VERSION
"
${
PROGRAM_VERSION
}
"
CACHE STRING
"Version of the program"
)
set
(
CPACK_PACKAGE_VENDOR
"Pierre Aubert"
CACHE STRING
"Vendor of the program"
)
set
(
CPACK_PACKAGE_DESCRIPTION_SUMMARY
${
PROGRAM_DESCRIPTION_NO_QUOTE
}
CACHE STRING
"Description of the program"
)
set
(
CPACK_RESOURCE_FILE_README
${
CMAKE_SOURCE_DIR
}
/README.md CACHE STRING
"DOC of the program"
)
set
(
CPACK_RESOURCE_FILE_WELCOME
${
CMAKE_SOURCE_DIR
}
/README.md CACHE STRING
"Welcome of the program"
)
set
(
CPACK_PACKAGE_HOMEPAGE_URL
${
PROGRAM_HOMEPAGE
}
CACHE STRING
"Homepage of the program"
)
set
(
CPACK_PACKAGE_CONTACT
"pierre.aubert@lapp.in2p3.fr"
CACHE STRING
"Contact of the program"
)
set
(
CPACK_PACKAGE_ICON
${
CMAKE_SOURCE_DIR
}
/doc/icon.bmp CACHE STRING
"Icon of the program"
)
set
(
CPACK_PACKAGE_DESCRIPTION
${
PROGRAM_DESCRIPTION_NO_QUOTE
}
CACHE STRING
"Desription with quote of the program"
)
if
(
CREATE_DEB
)
#Ok for UBUNTU
set
(
CPACK_GENERATOR
"DEB"
CACHE STRING
"Package type of the program"
)
set
(
CPACK_DEBIAN_PACKAGE_VERSION
"
${
PROGRAM_VERSION
}
"
CACHE STRING
"Version of the program"
)
set
(
CPACK_DEBIAN_PACKAGE_MAINTAINER
"pierre.aubert@lapp.in2p3.fr"
CACHE STRING
"Package maintainer of the program"
)
#required
set
(
CPACK_DEBIAN_PACKAGE_HOMEPAGE
${
PROGRAM_HOMEPAGE
}
CACHE STRING
"Homepage of the program"
)
#For the debian installer only
set
(
CPACK_DEBIAN_PACKAGE_DEPENDS
""
CACHE STRING
"Depends of the program"
)
endif
(
CREATE_DEB
)
if
(
CREATE_RPM
)
#Need to install rmp package on ubuntu which contains rpmbuild
set
(
CPACK_GENERATOR
"RPM"
CACHE STRING
"Package type of the program"
)
set
(
CPACK_RPM_PACKAGE_AUTOREQ
"NO"
CACHE STRING
"Caracteristics of the program"
)
set
(
CPACK_RPM_PACKAGE_REQUIRES
""
CACHE STRING
"Depends of the program"
)
endif
(
CREATE_RPM
)
# if(CREATE_DMG) #We should use DragNDrop or PackageMaker of osx
# set(CPACK_GENERATOR "DMG")
# endif(CREATE_DMG)
include
(
CPack
)
# Has to be used :
# cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCREATE_DEB=yes -DSSE4.2=yes # Or whatever extension
# make -j 8
# cpack
endif
()
endfunction
(
createLinuxPackages
)
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