-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add *.pc file for easier use in non-cmake environments. (#901)
pkg-config is the common way how to find cflags and library flags for projects not using cmake.
- Loading branch information
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
prefix=@CMAKE_INSTALL_PREFIX@ | ||
exec_prefix=${prefix} | ||
libdir=@CMAKE_INSTALL_FULL_LIBDIR@ | ||
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ | ||
|
||
Name: manifold@PCFILE_LIB_SUFFIX@ | ||
Description: Geometry library for topological robustness | ||
Version: @MANIFOLD_VERSION@ | ||
URL: https://github.com/elalish/manifold | ||
Requires-private: glm tbb @TEMPLATE_OPTIONAL_CLIPPER@ | ||
Libs: -L${libdir} -lmanifold@PCFILE_LIB_SUFFIX@ | ||
Cflags: -I${includedir} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
mkdir make-consumer | ||
cd make-consumer | ||
|
||
cat <<'EOT' >> Makefile | ||
CXXFLAGS=$(shell pkg-config --cflags manifold) | ||
LDFLAGS=$(shell pkg-config --libs manifold) | ||
testing : testing.cpp | ||
EOT | ||
|
||
cat <<EOT >> testing.cpp | ||
#include <manifold/manifold.h> | ||
int main() { manifold::Manifold foo; return 0; } | ||
EOT | ||
|
||
make | ||
./testing |