@@ -10,20 +10,19 @@ IF(WIN32)
1010 set_source_files_properties (${SRC} PROPERTIES LANGUAGE CXX)
1111ENDIF (WIN32 )
1212
13- IF (BUILD_AUDIO)
14- include (FindPythonInterp)
15- LIST (APPEND SRC audio.c loader.c)
16- IF (BUILD_REDIST_PACKAGE)
17- # If this build is intended for a redistributable package, we can't include audios.bin, so we should include fwfetcher.py
18- # and the package should run "python fwfetcher.py $INSTALL_PREFIX/share" as a postinst hook
19- install (FILES "fwfetcher.py" DESTINATION "${CMAKE_INSTALL_PREFIX} /share" )
20- ELSE (BUILD_REDIST_PACKAGE)
21- # If the install is local only, we can just run fwfetcher.py and install the audios.bin firmware to the system folder
22- add_custom_target (firmware ALL
23- COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR} /fwfetcher.py" "../audios.bin"
24- DEPENDS "${CMAKE_CURRENT_SOURCE_DIR} /fwfetcher.py" )
25- install (FILES "${CMAKE_CURRENT_BINARY_DIR} /../audios.bin" DESTINATION "${CMAKE_INSTALL_PREFIX} /share/libfreenect" )
26- ENDIF ()
13+ # Audio
14+ include (FindPythonInterp)
15+ LIST (APPEND SRC audio.c loader.c)
16+ IF (BUILD_REDIST_PACKAGE)
17+ # If this build is intended for a redistributable package, we can't include audios.bin, so we should include fwfetcher.py
18+ # and the package should run "python fwfetcher.py $INSTALL_PREFIX/share" as a postinst hook
19+ install (FILES "fwfetcher.py" DESTINATION "${CMAKE_INSTALL_PREFIX} /share" )
20+ ELSE (BUILD_REDIST_PACKAGE)
21+ # If the install is local only, we can just run fwfetcher.py and install the audios.bin firmware to the system folder
22+ add_custom_target (firmware ALL
23+ COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR} /fwfetcher.py" "../audios.bin"
24+ DEPENDS "${CMAKE_CURRENT_SOURCE_DIR} /fwfetcher.py" )
25+ install (FILES "${CMAKE_CURRENT_BINARY_DIR} /../audios.bin" DESTINATION "${CMAKE_INSTALL_PREFIX} /share/libfreenect" )
2726ENDIF ()
2827
2928add_library (freenect SHARED ${SRC} )
@@ -45,12 +44,8 @@ target_link_libraries (freenect ${LIBUSB_1_LIBRARIES})
4544target_link_libraries (freenectstatic ${LIBUSB_1_LIBRARIES} )
4645
4746# Install the header files
48- install (FILES "../include/libfreenect.h" "../include/libfreenect_registration.h"
47+ install (FILES "../include/libfreenect.h" "../include/libfreenect_registration.h" "../include/libfreenect_audio.h"
4948 DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR} )
50- if (BUILD_AUDIO)
51- install (FILES "../include/libfreenect_audio.h"
52- DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR} )
53- endif ()
5449
5550IF (UNIX AND NOT APPLE )
5651 # Produce a pkg-config file for linking against the shared lib
0 commit comments