Description of problem: # grep Name /usr/lib64/pkgconfig/qjdns-qt5.pc Name: qjdns # grep Name /usr/lib64/pkgconfig/qjdns.pc Name: qjdns # rpm -qf /usr/lib64/pkgconfig/qjdns-qt5.pc qjdns-qt5-devel-2.0.3-1.fc23.x86_64 # rpm -qf /usr/lib64/pkgconfig/qjdns.pc qjdns-qt4-devel-2.0.3-1.fc23.x86_64 Version-Release number of selected component (if applicable): see above How reproducible: yes Steps to Reproduce: 1. dnf install qjdns-qt4-devel qjdns-qt5-devel 2. do cmake pkg_search_module(qjdns qjdns) 3. Actual results: no idea if it collects Qt4 or Qt5 packages and is it randomly. Expected results: No error, both packages can co-exist. Additional info:
Sorry for reassign, this happened accidently cause of bug clone.
Do you mean that you doesn't know what version of qjdns (Qt4 or Qt5) you use? You can always do ldd /usr/lib64/libqjdns.so.2 to check it. Also in CMake world you shouldn't use pkg-config. Use CMake module always when it is possible. For qjdns you can do find_package(QJDns). Full CMakeLists.txt example project(test) cmake_minimum_required(VERSION 2.8.11) find_package(Qt5Core REQUIRED) find_package(QJDns REQUIRED)