Skip to content

Commit 60154aa

Browse files
committed
Reference docs: Main page: Mention CMake.
And generally make this like the version in master for libsigc++-3.0.
1 parent 6e5eee0 commit 60154aa

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

sigc++/sigc++.h

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,35 @@
6565
* g++ program.cc -o program `pkg-config --cflags --libs sigc++-2.0`
6666
* @endcode
6767
*
68+
* @subsection autotools Using Autotools
69+
*
6870
* Alternatively, if using autoconf, use the following in @c configure.ac:
6971
* @code
70-
* PKG_CHECK_MODULES([LIBSIGC], [sigc++-2.0])
72+
* PKG_CHECK_MODULES([DEPS], [sigc++-2.0])
7173
* @endcode
72-
* Then use the generated @c LIBSIGC_CFLAGS and @c LIBSIGC_LIBS variables
74+
* Then use the generated @c DEPS_CFLAGS and @c DEPS_LIBS variables
7375
* in the project @c Makefile.am files. For example:
7476
* @code
75-
* program_CPPFLAGS = $(LIBSIGC_CFLAGS)
76-
* program_LDADD = $(LIBSIGC_LIBS)
77+
* yourprogram_CPPFLAGS = $(DEPS_CFLAGS)
78+
* yourprogram_LDADD = $(DEPS_LIBS)
7779
* @endcode
7880
*
81+
* Your @c PKG_CHECK_MODULES() call should also mention any other libraries that
82+
* you need to use via pkg-config.
83+
*
84+
* @subsection cmake Using CMake
85+
*
86+
* If using CMake, use the following in @c CMakeList.txt:
87+
* @code
88+
* include(FindPkgConfig)
89+
* pkg_check_modules(DEPS REQUIRED sigc++-2.0)
90+
* include_directories(${DEPS_INCLUDE_DIRS})
91+
* target_link_libraries(yourprogram ${DEPS_LIBRARIES})
92+
* @endcode
93+
*
94+
* Your @c pkg_check_modules() call should also mention any other libraries that
95+
* you need to use via pkg-config.
96+
*
7997
* @section scope Scope of Documentation
8098
*
8199
* libsigc++ contains many template functions and template classes/structs,

0 commit comments

Comments
 (0)