-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
README.md: Mention including and pkg-config.
- Loading branch information
Showing
1 changed file
with
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,41 @@ | ||
# murrayc-tuple-utils | ||
A rough collection of code to manipulate C++ std::tuple<>s. | ||
|
||
## Basic Usage | ||
|
||
Include the specific header. For instance, | ||
```C++ | ||
#include <tuple-utils/tuple_end.h> | ||
``` | ||
|
||
If your source file is program.cc, you can compile it with: | ||
```shell | ||
g++ program.cc -o program `pkg-config --cflags --libs murrayc-tuple-utils-1.0` | ||
``` | ||
|
||
## Using Autotools | ||
|
||
Alternatively, if using autoconf, use the following in configure.ac: | ||
```m4 | ||
PKG_CHECK_MODULES([DEPS], [murrayc-tuple-utils-1.0]) | ||
``` | ||
|
||
Then use the generated DEPS_CFLAGS and DEPS_LIBS variables in the project Makefile.am files. For example: | ||
```Makefile | ||
yourprogram_CPPFLAGS = $(DEPS_CFLAGS) | ||
yourprogram_LDADD = $(DEPS_LIBS) | ||
``` | ||
|
||
Your PKG_CHECK_MODULES() call should also mention any other libraries that you need to use via pkg-config. | ||
|
||
## Using CMake | ||
|
||
If using CMake, use the following in CMakeList.txt: | ||
```CMake | ||
include(FindPkgConfig) | ||
pkg_check_modules(DEPS REQUIRED murrayc-tuple-utils-1.0) | ||
include_directories(${DEPS_INCLUDE_DIRS}) | ||
target_link_libraries(yourprogram ${DEPS_LIBRARIES}) | ||
``` | ||
|
||
Your pkg_check_modules() call should also mention any other libraries that you need to use via pkg-config |