Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nsyshid: Experimental libusb build #903

Closed
wants to merge 5 commits into from
Closed
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ bin/controllerProfiles/*
bin/gameProfiles/*

bin/graphicPacks/*

# macOS
.DS_Store
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ find_package(OpenSSL COMPONENTS Crypto SSL REQUIRED)
find_package(glm REQUIRED)
find_package(fmt 9.1.0 REQUIRED)
find_package(PNG REQUIRED)
find_package(libUSB REQUIRED)

# glslang versions older than 11.11.0 define targets without a namespace
if (NOT TARGET glslang::SPIRV AND TARGET SPIRV)
Expand Down
6 changes: 5 additions & 1 deletion src/Cafe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,10 @@ endif()

set_property(TARGET CemuCafe PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

target_include_directories(CemuCafe PUBLIC "../")
target_include_directories(CemuCafe PUBLIC
"../"
${LIBUSB_INCLUDE_DIR}
)
Copy link
Contributor

@Tachi107 Tachi107 Jul 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid manually adding a list of include dirs and libraries like these, and use imported targets instead. I'm not sure how to patch vcpkg dependencies to add imported targets when they are not already provided, but you could always submit a patch to https://github.com/microsoft/vcpkg/tree/master/ports/libusb.

Edit: the imported target should probably be named libusb::usb

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just going off of the usage for the libusb vcpkg, not sure if I would actually know what needs to change to submit a package there either but I will look in to it


target_link_libraries(CemuCafe PRIVATE
CemuAsm
Expand All @@ -504,6 +507,7 @@ target_link_libraries(CemuCafe PRIVATE
fmt::fmt
glslang::SPIRV
ih264d
${LIBUSB_LIBRARIES}
OpenSSL::Crypto
OpenSSL::SSL
PNG::PNG
Expand Down
Loading