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

Please provide an example of correct cmake usage for QHotkey #95

Open
yurivict opened this issue Jan 19, 2024 · 1 comment
Open

Please provide an example of correct cmake usage for QHotkey #95

yurivict opened this issue Jan 19, 2024 · 1 comment

Comments

@yurivict
Copy link

find_package(QHotkey CONFIG REQUIRED) succeeds but then when qhotkey is added to the list of libraries it just adds -lqhotkey unrelated to the above find_package. Is this how it works, or something else should be added to other libraries as a dependency on QHotkey?

@apesci1
Copy link

apesci1 commented Sep 25, 2024

@yurivict - i had the same error and noticed my install path under C:\Program Files (x86) was qhotkey.

I tried the following and it worked:

find_package(qhotkey REQUIRED)
# Link the Qt libraries
target_link_libraries(example PRIVATE
    Qt${QT_VERSION_MAJOR}::Widgets
    qhotkey
)

Honestly not sure why this is the case but hopefully this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants