Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,22 @@
scythe
scythe2
footswitch
footswitch1p
obj*/
*-build-deps_*
debian/files
debian/footswitch/
debian/footswitch.substvars
debian/*debhelper*

CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
CMakeUserPresets.json
11 changes: 5 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ project(footswitch C)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY build)
set(SRCDIR src)

find_package(PkgConfig)
pkg_check_modules(HIDAPI REQUIRED hidapi-libusb)

include_directories(${HIDAPI_INCLUDE_DIRS} include)
link_libraries(${HIDAPI_LIBRARIES})
link_directories(src)
find_package(PkgConfig REQUIRED)
pkg_check_modules(HIDAPI REQUIRED IMPORTED_TARGET hidapi-libusb)

foreach(exe IN ITEMS footswitch scythe scythe2 footswitch1p)
add_executable(${exe}
Expand All @@ -18,6 +14,9 @@ foreach(exe IN ITEMS footswitch scythe scythe2 footswitch1p)
${SRCDIR}/${exe}.c
)

target_include_directories(${exe} PRIVATE include)
target_link_libraries(${exe} PRIVATE PkgConfig::HIDAPI)

install(TARGETS ${exe}
RUNTIME DESTINATION bin
)
Expand Down
4 changes: 3 additions & 1 deletion HomebrewFormula/footswitch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ class Footswitch < Formula
license "MIT"
head "https://github.com/rgerganov/footswitch.git"

depends_on "cmake" => :build
depends_on "hidapi"
depends_on "pkg-config"

def install
system "mkdir", "#{prefix}/bin"
mkdir bin
system "cmake", "./", "-DCMAKE_INSTALL_PREFIX=#{prefix}"
system "make", "install", "PREFIX=#{prefix}"
end
end