Skip to content

Commit

Permalink
All headers (including libfreenect.hpp) are installed to `$PREFIX/inc…
Browse files Browse the repository at this point in the history
…lude/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 <benn.snyder@gmail.com>
  • Loading branch information
piedar committed Feb 15, 2014
1 parent cfe9c49 commit 7b9a5de
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 26 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Expand Up @@ -193,13 +193,13 @@ IF ( BUILD_CPACK )


INSTALL(FILES "${CMAKE_BINARY_DIR}/lib/libfreenect.a" DESTINATION ${PROJECT_LIBRARY_INSTALL_DIR}) INSTALL(FILES "${CMAKE_BINARY_DIR}/lib/libfreenect.a" DESTINATION ${PROJECT_LIBRARY_INSTALL_DIR})
if (BUILD_AUDIO) if (BUILD_AUDIO)
INSTALL(FILES "include/libfreenect-audio.h" DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR}) INSTALL(FILES "include/libfreenect_audio.h" DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
endif() endif()
INSTALL(FILES "include/libfreenect.h" DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR}) INSTALL(FILES "include/libfreenect.h" DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
INSTALL(FILES "include/libfreenect-registration.h" DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR}) INSTALL(FILES "include/libfreenect_registration.h" DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
INSTALL(FILES "APACHE20" DESTINATION "share/doc/${CPACK_PACKAGE_NAME}") INSTALL(FILES "APACHE20" DESTINATION "share/doc/${CPACK_PACKAGE_NAME}")
INSTALL(FILES "GPL2" DESTINATION "share/doc/${CPACK_PACKAGE_NAME}") INSTALL(FILES "GPL2" DESTINATION "share/doc/${CPACK_PACKAGE_NAME}")
INSTALL(FILES "README.asciidoc" DESTINATION "share/doc/${CPACK_PACKAGE_NAME}") INSTALL(FILES "README.md" DESTINATION "share/doc/${CPACK_PACKAGE_NAME}")


ENDIF ( BUILD_CPACK ) ENDIF ( BUILD_CPACK )


2 changes: 1 addition & 1 deletion examples/micview.c
Expand Up @@ -25,7 +25,7 @@
*/ */


#include "libfreenect.h" #include "libfreenect.h"
#include "libfreenect-audio.h" #include "libfreenect_audio.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <signal.h> #include <signal.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/wavrecord.c
Expand Up @@ -25,7 +25,7 @@
*/ */


#include "libfreenect.h" #include "libfreenect.h"
#include "libfreenect-audio.h" #include "libfreenect_audio.h"
#include <stdio.h> #include <stdio.h>
#include <signal.h> #include <signal.h>


Expand Down
2 changes: 1 addition & 1 deletion fakenect/fakenect.c
Expand Up @@ -23,7 +23,7 @@
* either License. * either License.
*/ */


#include <libfreenect.h> #include "libfreenect.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion fakenect/record.c
Expand Up @@ -23,9 +23,9 @@
* either License. * either License.
*/ */


#include "libfreenect.h"
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <libfreenect.h>
#include <stdio.h> #include <stdio.h>
#include <signal.h> #include <signal.h>
#include <string.h> #include <string.h>
Expand Down
3 changes: 1 addition & 2 deletions include/libfreenect-audio.h → include/libfreenect_audio.h
Expand Up @@ -23,10 +23,9 @@
* Binary distributions must follow the binary distribution requirements of * Binary distributions must follow the binary distribution requirements of
* either License. * either License.
*/ */

#pragma once #pragma once


#include <libfreenect.h> #include "libfreenect.h"
#include <stdint.h> #include <stdint.h>


#ifdef __cplusplus #ifdef __cplusplus
Expand Down
Expand Up @@ -23,10 +23,9 @@
* Binary distributions must follow the binary distribution requirements of * Binary distributions must follow the binary distribution requirements of
* either License. * either License.
*/ */

#pragma once #pragma once


#include <libfreenect.h> #include "libfreenect.h"
#include <stdint.h> #include <stdint.h>


#ifdef __cplusplus #ifdef __cplusplus
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Expand Up @@ -48,10 +48,10 @@ target_link_libraries (freenect ${LIBUSB_1_LIBRARIES})
target_link_libraries (freenectstatic ${LIBUSB_1_LIBRARIES}) target_link_libraries (freenectstatic ${LIBUSB_1_LIBRARIES})


# Install the header files # Install the header files
install (FILES "../include/libfreenect.h" "../include/libfreenect-registration.h" install (FILES "../include/libfreenect.h" "../include/libfreenect_registration.h"
DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR}) DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
if(BUILD_AUDIO) if(BUILD_AUDIO)
install (FILES "../include/libfreenect-audio.h" install (FILES "../include/libfreenect_audio.h"
DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR}) DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
endif() endif()


Expand Down
2 changes: 1 addition & 1 deletion src/audio.c
Expand Up @@ -24,7 +24,7 @@
* either License. * either License.
*/ */
#include "libfreenect.h" #include "libfreenect.h"
#include "libfreenect-audio.h" #include "libfreenect_audio.h"
#include "freenect_internal.h" #include "freenect_internal.h"


#include <string.h> #include <string.h>
Expand Down
9 changes: 4 additions & 5 deletions src/freenect_internal.h
Expand Up @@ -23,22 +23,21 @@
* Binary distributions must follow the binary distribution requirements of * Binary distributions must follow the binary distribution requirements of
* either License. * either License.
*/ */

#pragma once #pragma once


#include <stdint.h> #include <stdint.h>


#include "libfreenect.h" #include "libfreenect.h"
#include "libfreenect-registration.h" #include "libfreenect_registration.h"


#ifdef BUILD_AUDIO #ifdef BUILD_AUDIO
#include "libfreenect-audio.h" #include "libfreenect_audio.h"
#endif #endif


#ifdef __ELF__ #ifdef __ELF__
#define FN_INTERNAL __attribute__ ((visibility ("hidden"))) #define FN_INTERNAL __attribute__ ((visibility ("hidden")))
#else #else
#define FN_INTERNAL #define FN_INTERNAL
#endif #endif




Expand Down
4 changes: 2 additions & 2 deletions src/registration.c
Expand Up @@ -24,8 +24,8 @@
* either License. * either License.
*/ */


#include <libfreenect.h> #include "libfreenect.h"
#include <freenect_internal.h> #include "freenect_internal.h"
#include "registration.h" #include "registration.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
Expand Down
3 changes: 1 addition & 2 deletions wrappers/c_sync/libfreenect_sync.h
Expand Up @@ -23,10 +23,9 @@
* Binary distributions must follow the binary distribution requirements of * Binary distributions must follow the binary distribution requirements of
* either License. * either License.
*/ */

#pragma once #pragma once


#include <libfreenect.h> #include "libfreenect.h"
#include <stdint.h> #include <stdint.h>


#ifdef __cplusplus #ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion wrappers/cpp/CMakeLists.txt
@@ -1,5 +1,5 @@
INSTALL(FILES libfreenect.hpp INSTALL(FILES libfreenect.hpp
DESTINATION include) DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})


IF(BUILD_EXAMPLES) IF(BUILD_EXAMPLES)


Expand Down
3 changes: 1 addition & 2 deletions wrappers/cpp/libfreenect.hpp
Expand Up @@ -23,10 +23,9 @@
* Binary distributions must follow the binary distribution requirements of * Binary distributions must follow the binary distribution requirements of
* either License. * either License.
*/ */

#pragma once #pragma once


#include <libfreenect.h> #include "libfreenect.h"
#include <stdexcept> #include <stdexcept>
#include <sstream> #include <sstream>
#include <map> #include <map>
Expand Down

0 comments on commit 7b9a5de

Please sign in to comment.