Skip to content

Prepend DESTDIR to CMAKE_INSTALL_PREFIX to run cpack out of the box#56

Closed
mlaveaux wants to merge 1 commit intotrolando:masterfrom
mlaveaux:fixes/cpack
Closed

Prepend DESTDIR to CMAKE_INSTALL_PREFIX to run cpack out of the box#56
mlaveaux wants to merge 1 commit intotrolando:masterfrom
mlaveaux:fixes/cpack

Conversation

@mlaveaux
Copy link
Copy Markdown
Contributor

I don't know how people ever figured this out in mCRL2, but it seems that pack -G DEB uses a hidden environment variable called DESTDIR to overwrite the CMAKE_INSTALL_PREFIX such that it does not require sudo rights for making the installation package.

With these changes generating the package works properly on Ubuntu and Fedora. This variable does not work on Windows, so this might required special attention that I did not look into. Alternatively, we would have to overwrite CMAKE_INSTALL_PREFIX ourselves in the CI, but this change does seem like the standard "solution".

@trolando
Copy link
Copy Markdown
Owner

trolando commented Apr 1, 2026

I had a go at the whole build script with some suggestions from Claude, and the result might actually be cleaner: 1188edd

Can you see if that works for you?

@trolando trolando force-pushed the master branch 5 times, most recently from 1188edd to c3dce1d Compare April 1, 2026 22:51
@mlaveaux
Copy link
Copy Markdown
Contributor Author

mlaveaux commented Apr 2, 2026

The new version works resolved the cpack issue so this seems to be resolved. By the way I can also open another issue for it, but we get warnings related to this line in the src/CMakeLists.txt of Sylvan:

set_target_properties(sylvan PROPERTIES PUBLIC_HEADER "${SYLVAN_HDRS}")

This yields some warning when running cmake:

$cmake .
CMake Warning (dev) at CMakeLists.txt:190 (install):
  Target sylvan has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.
This warning is for project developers.  Use -Wno-dev to suppress it.

Commenting it out fixes it for us, but just for your information.

@trolando
Copy link
Copy Markdown
Owner

trolando commented Apr 5, 2026

Alright! I've fixed that for the next version of Sylvan (or just pull the master branch)

@trolando trolando closed this Apr 5, 2026
@mlaveaux mlaveaux deleted the fixes/cpack branch April 5, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants