Skip to content

Commit

Permalink
README.md: Mention including and pkg-config.
Browse files Browse the repository at this point in the history
  • Loading branch information
murraycu committed Aug 11, 2016
1 parent 4928e61 commit dfa8a2c
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions README.md
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

0 comments on commit dfa8a2c

Please sign in to comment.