Skip to content

Commit 6f64284

Browse files
committed
build: remove deprecated cmake features
Signed-off-by: Benn Snyder <[email protected]>
1 parent a9806d3 commit 6f64284

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# CMake directives
3131
######################################################################################
3232

33-
cmake_minimum_required(VERSION 2.8.12)
33+
cmake_minimum_required(VERSION 2.8.12...3.12)
3434

3535
######################################################################################
3636
# Project declaration and options

src/CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
66
include_directories(${LIBUSB_1_INCLUDE_DIRS})
77

88
# Audio Firmware
9-
include(FindPythonInterp)
109
IF(BUILD_REDIST_PACKAGE)
1110
# If this build is intended for a redistributable package, we can't include audios.bin, so we should include fwfetcher.py
1211
# and the package should run "python fwfetcher.py $INSTALL_PREFIX/share" as a postinst hook
1312
install (FILES "fwfetcher.py" DESTINATION "${CMAKE_INSTALL_PREFIX}/share")
1413
ELSE(BUILD_REDIST_PACKAGE)
1514
# If the install is local only, we can just run fwfetcher.py and install the audios.bin firmware to the system folder
15+
cmake_minimum_required(VERSION 3.12)
16+
find_package(Python REQUIRED COMPONENTS Interpreter)
1617
add_custom_target(firmware ALL
17-
COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/fwfetcher.py" "../audios.bin"
18+
COMMAND ${Python_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/fwfetcher.py" "../audios.bin"
1819
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/fwfetcher.py")
1920
install (FILES "${CMAKE_CURRENT_BINARY_DIR}/../audios.bin" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/libfreenect")
2021
ENDIF()

src/fwfetcher.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python2
1+
#!/usr/bin/env python
22

33
from __future__ import absolute_import, division, print_function
44

0 commit comments

Comments
 (0)