Skip to content

Commit 49d4465

Browse files
committed
Merge pull request #289 from goldhoorn/pkg-config
Added pkg-config file to support external library usages
2 parents a977e68 + 9b08d23 commit 49d4465

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ examples/protonect/include/libfreenect2/config.h
44
# generated resource file
55
examples/protonect/src/resources.inc.h
66
examples/protonect/build
7+
examples/protonect/lib
78

89
# Dependency folders
910
depends/*/

examples/protonect/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ TARGET_LINK_LIBRARIES(Protonect
192192
)
193193

194194
CONFIGURE_FILE(freenect2.cmake.in "${PROJECT_BINARY_DIR}/freenect2Config.cmake" @ONLY)
195+
CONFIGURE_FILE(freenect2.pc.in "${PROJECT_BINARY_DIR}/freenect2.pc" @ONLY)
195196

196197
INSTALL(TARGETS freenect2shared DESTINATION lib)
197198
INSTALL(TARGETS freenect2static DESTINATION lib)
@@ -200,4 +201,5 @@ IF(LIBFREENECT2_THREADING_TINYTHREAD)
200201
INSTALL(FILES "${MY_DIR}/src/tinythread/tinythread.h" DESTINATION include/${PROJECT_NAME}/tinythread/)
201202
ENDIF(LIBFREENECT2_THREADING_TINYTHREAD)
202203
INSTALL(FILES "${PROJECT_BINARY_DIR}/freenect2Config.cmake" DESTINATION lib/cmake/freenect2/)
204+
INSTALL(FILES "${PROJECT_BINARY_DIR}/freenect2.pc" DESTINATION lib/pkgconfig/)
203205

examples/protonect/freenect2.pc.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
prefix=@CMAKE_INSTALL_PREFIX@
2+
exec_prefix=@CMAKE_INSTALL_PREFIX@
3+
libdir=${prefix}/lib
4+
includedir=${prefix}/include
5+
6+
Name: freenect2
7+
Description: Driver for the Kinect v2 (aka K4W)
8+
Version:
9+
Requires: @DEPS_PKGCONFIG@
10+
Libs: -L${libdir} -lfreenect2
11+
Cflags: -I${includedir}
12+

0 commit comments

Comments
 (0)