Skip to content

Fix CMake configure failing on BSD#46

Open
hellium6 wants to merge 1 commit into
JFreegman:masterfrom
hellium6:cmake-bsd
Open

Fix CMake configure failing on BSD#46
hellium6 wants to merge 1 commit into
JFreegman:masterfrom
hellium6:cmake-bsd

Conversation

@hellium6
Copy link
Copy Markdown

This PR allows to successfully build on NetBSD 10. Related to #45 .

FREEBSD generator seems to work on NetBSD and other BSDs:

The CPack FreeBSD generator may be used to create pkg(8) packages -- these may be used on FreeBSD, DragonflyBSD, NetBSD, OpenBSD, but also on Linux or OSX, depending on the installed package-management tools -- using CPack.

https://cmake.org/cmake/help/latest/cpack_gen/freebsd.html

So adding this should get rid of the error mentioned in the issue in those BSDs.

"It tries to re-use packaging information that may already be specified for Debian packages for the CPack DEB Generator." CMakeLists.txt already has CPACK_DEBIAN_* values, so there should be no need to specify them for FreeBSD.

NetBSD has a different prefix for packages installed with pkgsrc or pkgin:

$ uname -smr
NetBSD 10.0 amd64
$ pkgconf --libs libsodium
-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lsodium

It causes linking to fail:

...
[100%] Linking CXX executable spicypass
ld: cannot find -lsodium
ld: cannot find -lgtk-3
ld: cannot find -lgdk-3
ld: cannot find -lpangocairo-1.0
ld: cannot find -lpango-1.0
ld: cannot find -lharfbuzz
ld: cannot find -latk-1.0
ld: cannot find -lcairo-gobject
ld: cannot find -lcairo
ld: cannot find -lgdk_pixbuf-2.0
ld: cannot find -lgio-2.0
ld: cannot find -lgobject-2.0
ld: cannot find -lglib-2.0
gmake[2]: *** [CMakeFiles/spicypass.dir/build.make:196: spicypass] Error 1
...

So had to add CMAKE_CXX_FLAGS for NetBSD

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.

1 participant