cpack

cpack restrict OS version package can be installed on

强颜欢笑 提交于 2021-02-11 12:42:34
问题 I create packages for several OS versions including RHEL7 & RHEL8 (or mostly equally CentOS7 & 8). It is possible to install a package built for .el7. on .el8. but it will typically not work (for example due to undefined symbols etc). Ideally I would like to make the installation fail with an error message like "this package is only intend for RHEL7/CentOS7". How can I do this? More specifically how can I do this with CPack/CMake? Bonus points if you can also given an explanation suitable for

CMake CPack debian packages

寵の児 提交于 2020-06-25 02:42:44
问题 Has someone worked with a working example of a CPack script for debian packages with Qt and OpenGL dependencies? I've set this one set (CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libgcc1 (>= 1:3.4.2-12), libQtOpenGL (>=4.6.0), libQtCore (>=4.6.0), libQtGui (>=4.6.0), libglut (>=3.0), libICE (>=6.0), libX11 (>=6.0), libXext (>=6.0), libXmu (>=6.0), libXi (>=6.0), libstdc++ (>=6.0), libm (>=6.0), libgcc_s (>=1.0), libc (>=6.0), libGLU, libGL (>=1.0), libpthread" ) I googled around but

CPack: How to use exporting to create library package? Missing *Targets-noconfig.cmake file

血红的双手。 提交于 2020-01-04 01:52:31
问题 Update It looks like it's Windows cpack version bug - under Linux (Ubuntu) the cpack command the missing file. I'll do more research and post results when I have more time. Note: I completely changed this question because I was able to simplify it and create new, shorter example. Core problem, however didn't change in the slightest. Problem description I have a library project, let's call it Foo, which I pack using cpack command. This package contains FooConfig.cmake and FooTargets.cmake

zip files using CMake?

人盡茶涼 提交于 2020-01-01 07:31:10
问题 tl;dr version: is it possible with CMake (>= 2.8) to generate zip files from some files and put the packed zip file in a specific location? longer version: I have a CMakeLists.txt that build my project to a .exe file. And this exe file will read data from a zip file. Now it is so that the content to be packed in the zip file is in my git repository so that it can be edited, too. But the program needs this data in a zip file. So it would be good if the cmake script could take the data, put it

cpack and install(CODE …) - CPACK_PACKAGING_INSTALL_PREFIX vs CMAKE_INSTALL_PREFIX

余生颓废 提交于 2019-12-24 07:29:11
问题 as a "post-install hook" I need to execute an install command like install(CODE "execute_process(COMMAND some_command ${CMAKE_INSTALL_PREFIX}/some_folder")) which creates a file in some_folder based on the files which were previously installed into some_folder (it compiles an index/cache of those files). This works fine for the install target, however as soon as using cpack ${CMAKE_INSTALL_PREFIX} is not the correct location anymore. Is there a variable like ${CMAKE_CURRENT_INSTALL_PREFIX}

How to skip dependency on all for package target?

安稳与你 提交于 2019-12-24 06:52:09
问题 I have a project with few separate build targets, which are exclusive - but they're built from the same sources, just in other configurations, targets etc. I need the install and package targets to be independent from all target, which is a default. For the install target there's a CMAKE_SKIP_INSTALL_ALL_DEPENDENCY variable, which works very well and do what I need. How to turn the dependency from all for CPack's output off, too? 回答1: You answered the question more or less yourself: CMAKE

How to build subpackages defined in .spec files using CPACK

旧城冷巷雨未停 提交于 2019-12-23 22:15:56
问题 Following this tutorial on Spec File Changes For Subpackages I was able to create two RPMs with a single build doing the following: My spec file is something like: Name: @CPACK_PACKAGE_NAME@ License: the license Summary: the summary Group: Applications Version: @CPACK_PACKAGE_RELEASE_VERSION@.@CPACK_PACKAGE_MINOR_VERSION@.@CPACK_PACKAGE_SERVICE_PACK@ Release: @CPACK_PACKAGE_BUILD@ %description the description... %package utils Summary: the utils Group: Applications %description utils

CPack: Exclude INSTALL commands from subdirectory (googletest directory)

元气小坏坏 提交于 2019-12-17 14:50:13
问题 I'm using CMake for a project and googletest for my test cases. Looking around the internet, it seems to be common practise to just copy the googletest source into a subfolder of your repository and include it with "add_subdirectory(googletest)". I did that. Now I'm using CPack to generate debian packages for my project. Unfortunately, the packages generated by CPack install googletest alongside with my project. This is of course not what I want. Looking in the googletest directory, I found

CPack: Exclude INSTALL commands from subdirectory (googletest directory)

[亡魂溺海] 提交于 2019-12-17 14:49:59
问题 I'm using CMake for a project and googletest for my test cases. Looking around the internet, it seems to be common practise to just copy the googletest source into a subfolder of your repository and include it with "add_subdirectory(googletest)". I did that. Now I'm using CPack to generate debian packages for my project. Unfortunately, the packages generated by CPack install googletest alongside with my project. This is of course not what I want. Looking in the googletest directory, I found

How do you make it so that cpack doesn't add required libraries to an RPM?

风流意气都作罢 提交于 2019-12-12 07:45:44
问题 I'm trying to convert our build system at work over to cmake and have run into an interesting problem with the RPMs that it generates (via cpack): It automatically adds all of the dependencies that it thinks your RPM has to its list of required libraries. In general, that's great, but in my case, it's catastrophic. Unfortunately, the development packages that we build end up getting installed with one our home-grown tool that uses rpm to install them in a separate RPM database from the system