usbmuxd: Pass path to libusb headers to CMake
CMake fails to find this info on it's own. Fixes Homebrew/homebrew#7293.master
parent
cea9127232
commit
0ccaf8ccfd
|
@ -8,12 +8,26 @@ class Usbmuxd < Formula
|
|||
head 'http://cgit.sukimashita.com/usbmuxd.git'
|
||||
|
||||
depends_on 'cmake' => :build
|
||||
depends_on 'pkg-config' => :build
|
||||
|
||||
depends_on 'libusb'
|
||||
depends_on 'libplist'
|
||||
|
||||
def install
|
||||
libusb = Formula.factory 'libusb'
|
||||
inreplace 'Modules/VersionTag.cmake', '"sh"', '"bash"'
|
||||
system "cmake #{std_cmake_parameters} -DLIB_SUFFIX='' ."
|
||||
system "make install"
|
||||
|
||||
# The CMake scripts responsible for locating libusb headers are broken. So,
|
||||
# we explicitly point the build script at the proper directory.
|
||||
args = std_cmake_parameters.split.concat %W[
|
||||
-DLIB_SUFFIX=''
|
||||
-DUSB_INCLUDE_DIR='#{libusb.include.children.first}'
|
||||
]
|
||||
|
||||
mkdir 'build'
|
||||
chdir 'build' do
|
||||
system 'cmake', '..', *args
|
||||
system 'make install'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue