Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cmake-template.SlackBuild
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ cd build
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_DOCDIR="doc/$PRGNAM-$VERSION" \
-DCMAKE_INSTALL_INFODIR=info \
-DCMAKE_INSTALL_MANDIR=man \
Comment on lines +118 to +120
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a relative path is given for any of these variables, the computed installation path is relative to CMAKE_INSTALL_PREFIX, as documented in /usr/share/cmake-*/Modules/GNUInstallDirs.cmake.

-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DMAN_INSTALL_DIR=/usr/man \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is perhaps more contentious. Sourcegraph suggests that the built-in CMAKE_INSTALL_MANDIR is much more widely used than MAN_INSTALL_DIR - 9.2k results vs 1.5k. I'd say MAN_INSTALL_DIR should be defined for projects that don't use the built-in variable.

-DCMAKE_BUILD_TYPE=Release ..
make
make install/strip DESTDIR=$PKG
Expand Down