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

use QJDns cmake config module #32

Open
drizt opened this issue Jul 9, 2015 · 3 comments
Open

use QJDns cmake config module #32

drizt opened this issue Jul 9, 2015 · 3 comments

Comments

@drizt
Copy link

drizt commented Jul 9, 2015

jdns/qjdns provides cmake config module. So they should be used instead of pkg-config in CMake. Replace

    # For Linux it was found already before at line 29
    if(NOT LINUX)
            find_package(PkgConfig)
    endif()
    pkg_search_module(JDNS REQUIRED qjdns)

with

find_package(QJDns)

Note. The latest jdns-2.0.3 provides coinstallable Qt4/Qt5 versions of qjdns. So find_package(QJDns)
is good for both

@euroelessar
Copy link
Owner

Hi,
Jreen doesn't use jdns library in case of Qt5 as latter has built-in QDnsLookup class. Also what is a benefit of searching jdns by find_package instead of pkg_search_module?

@drizt
Copy link
Author

drizt commented Jul 9, 2015

qjdns.pc was renamed to qjdns-qt4.pc in jdns-2.0.3. CMake config file name was not changed. Also cmake config module provides qjdns target which more suitable. With qjdns target no need to explicity set jdns include dir. It enough to do target_link_libraries(${PROJECT_NAME} qjdns). Also cmake is not recommended to use pkg-config when there is cmake module.

@euroelessar
Copy link
Owner

Makes sense, thank you for information. I'll try to update it today.

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