Skip to content

Commit 7b9a5de

Browse files
committed
All headers (including libfreenect.hpp) are installed to $PREFIX/include/libfreenect/.
All libfreenect files have `#include "libfreenect.h"` rather than `#include <libfreenect.h>`. This works during build and after installation all include files are in the same directory. Rename libfreenect-audio.h -> libfreenect_audio.h and libfreenect-registration.h -> libfreenect_registration.h. This makes them consistent with other libraries. THIS IS A BREAKING CHANGE; UPDATE YOUR INCLUDES Signed-off-by: Benn Snyder <[email protected]>
1 parent cfe9c49 commit 7b9a5de

File tree

14 files changed

+21
-26
lines changed

14 files changed

+21
-26
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,13 @@ IF ( BUILD_CPACK )
193193

194194
INSTALL(FILES "${CMAKE_BINARY_DIR}/lib/libfreenect.a" DESTINATION ${PROJECT_LIBRARY_INSTALL_DIR})
195195
if (BUILD_AUDIO)
196-
INSTALL(FILES "include/libfreenect-audio.h" DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
196+
INSTALL(FILES "include/libfreenect_audio.h" DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
197197
endif()
198198
INSTALL(FILES "include/libfreenect.h" DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
199-
INSTALL(FILES "include/libfreenect-registration.h" DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
199+
INSTALL(FILES "include/libfreenect_registration.h" DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
200200
INSTALL(FILES "APACHE20" DESTINATION "share/doc/${CPACK_PACKAGE_NAME}")
201201
INSTALL(FILES "GPL2" DESTINATION "share/doc/${CPACK_PACKAGE_NAME}")
202-
INSTALL(FILES "README.asciidoc" DESTINATION "share/doc/${CPACK_PACKAGE_NAME}")
202+
INSTALL(FILES "README.md" DESTINATION "share/doc/${CPACK_PACKAGE_NAME}")
203203

204204
ENDIF ( BUILD_CPACK )
205205

examples/micview.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626

2727
#include "libfreenect.h"
28-
#include "libfreenect-audio.h"
28+
#include "libfreenect_audio.h"
2929
#include <stdio.h>
3030
#include <string.h>
3131
#include <signal.h>

examples/wavrecord.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626

2727
#include "libfreenect.h"
28-
#include "libfreenect-audio.h"
28+
#include "libfreenect_audio.h"
2929
#include <stdio.h>
3030
#include <signal.h>
3131

fakenect/fakenect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* either License.
2424
*/
2525

26-
#include <libfreenect.h>
26+
#include "libfreenect.h"
2727
#include <stdio.h>
2828
#include <string.h>
2929
#include <stdlib.h>

fakenect/record.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
* either License.
2424
*/
2525

26+
#include "libfreenect.h"
2627
#include <sys/stat.h>
2728
#include <sys/types.h>
28-
#include <libfreenect.h>
2929
#include <stdio.h>
3030
#include <signal.h>
3131
#include <string.h>

include/libfreenect-audio.h renamed to include/libfreenect_audio.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@
2323
* Binary distributions must follow the binary distribution requirements of
2424
* either License.
2525
*/
26-
2726
#pragma once
2827

29-
#include <libfreenect.h>
28+
#include "libfreenect.h"
3029
#include <stdint.h>
3130

3231
#ifdef __cplusplus

include/libfreenect-registration.h renamed to include/libfreenect_registration.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@
2323
* Binary distributions must follow the binary distribution requirements of
2424
* either License.
2525
*/
26-
2726
#pragma once
2827

29-
#include <libfreenect.h>
28+
#include "libfreenect.h"
3029
#include <stdint.h>
3130

3231
#ifdef __cplusplus

src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ target_link_libraries (freenect ${LIBUSB_1_LIBRARIES})
4848
target_link_libraries (freenectstatic ${LIBUSB_1_LIBRARIES})
4949

5050
# Install the header files
51-
install (FILES "../include/libfreenect.h" "../include/libfreenect-registration.h"
51+
install (FILES "../include/libfreenect.h" "../include/libfreenect_registration.h"
5252
DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
5353
if(BUILD_AUDIO)
54-
install (FILES "../include/libfreenect-audio.h"
54+
install (FILES "../include/libfreenect_audio.h"
5555
DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
5656
endif()
5757

src/audio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* either License.
2525
*/
2626
#include "libfreenect.h"
27-
#include "libfreenect-audio.h"
27+
#include "libfreenect_audio.h"
2828
#include "freenect_internal.h"
2929

3030
#include <string.h>

src/freenect_internal.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,21 @@
2323
* Binary distributions must follow the binary distribution requirements of
2424
* either License.
2525
*/
26-
2726
#pragma once
2827

2928
#include <stdint.h>
3029

3130
#include "libfreenect.h"
32-
#include "libfreenect-registration.h"
31+
#include "libfreenect_registration.h"
3332

3433
#ifdef BUILD_AUDIO
35-
#include "libfreenect-audio.h"
34+
#include "libfreenect_audio.h"
3635
#endif
3736

3837
#ifdef __ELF__
39-
#define FN_INTERNAL __attribute__ ((visibility ("hidden")))
38+
#define FN_INTERNAL __attribute__ ((visibility ("hidden")))
4039
#else
41-
#define FN_INTERNAL
40+
#define FN_INTERNAL
4241
#endif
4342

4443

0 commit comments

Comments
 (0)