@@ -10,20 +10,19 @@ IF(WIN32)
10
10
set_source_files_properties (${SRC} PROPERTIES LANGUAGE CXX)
11
11
ENDIF (WIN32 )
12
12
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" )
27
26
ENDIF ()
28
27
29
28
add_library (freenect SHARED ${SRC} )
@@ -45,12 +44,8 @@ target_link_libraries (freenect ${LIBUSB_1_LIBRARIES})
45
44
target_link_libraries (freenectstatic ${LIBUSB_1_LIBRARIES} )
46
45
47
46
# 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"
49
48
DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR} )
50
- if (BUILD_AUDIO)
51
- install (FILES "../include/libfreenect_audio.h"
52
- DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR} )
53
- endif ()
54
49
55
50
IF (UNIX AND NOT APPLE )
56
51
# Produce a pkg-config file for linking against the shared lib
0 commit comments