Adding the library



  • My project uses qmake, i want to add KAuth Framework to the project. How can i do it? It seems that kauth uses cmake for building from source. but there is a line about qmake (QT += kauth). What should i do?



  • Compile KAuth then Just add the path to the headers and the libraries to INCLUDEPATH and LIBS
    for example, if you install the library in C:\KDE

    INCLUDEPATH += "C:/KDE/include/KF5/KAuth"
    INCLUDEPATH += "C:/KDE/include/KF5"
    LIBS += -L"C:/KDE/lib"
    LIBS += -lKF5Auth
    


  • i receive such an error while compiling it:

    denis@denis-MS-7850:~/Загрузки/kauth-5.21.0/src/build$ cmake ..
    -- No backend for KAuth was explicitly specified: probing system to find the best one available
    CMake Error at ConfigureChecks.cmake:22 (set_package_properties):
    Unknown CMake command "set_package_properties".
    Call Stack (most recent call first):
    CMakeLists.txt:5 (include)

    CMake Warning (dev) in CMakeLists.txt:
    No cmake_minimum_required command is present. A line of code such as

    cmake_minimum_required(VERSION 3.5)
    

    should be added at the top of the file. The version specified may be lower
    if you wish to support older CMake versions for this project. For more
    information run "cmake --help-policy CMP0000".
    This warning is for project developers. Use -Wno-dev to suppress it.

    -- Configuring incomplete, errors occurred!
    See also "/home/denis/Загрузки/kauth-5.21.0/src/build/CMakeFiles/CMakeOutput.log".



  • Just to confirm, did you download the latest CMake version and installed the extra cmake modules prerequisite?

    This is the command line I use to build it (Win 7, MSVC2013)

    mkdir build
    cd build
    cmake -G "NMake Makefiles" -DCMAKE_DEBUG_POSTFIX=d -DCMAKE_INSTALL_PREFIX=C:/KDE -DCMAKE_BUILD_TYPE=DEBUG ../
    nmake
    nmake install
    cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:/KDE -DCMAKE_BUILD_TYPE=RELEASE ../
    nmake
    nmake install
    


  • @VRonin so, finally i have installed everything. Now I receive an error while writing

    #include "KF5/KAuth/kauthaction.h"
    

    /usr/local/include/KF5/KAuth/kauthaction.h:29: error: kauth_export.h: No such file or directory

    I tried to include kauth_export.h before, but it didn`t help.

    Update:
    Now i receive ths error
    /media/denis/20E496E7E496BE8A/Apertium-GP/Installer/downloadwindow.cpp:136: error: undefined reference to `KAuth::Action::Action(QString const&)'

    It seems there is no cpp files generated. How to create them? i followed instructions in the kde website.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.