building_source.md

    Buildingthesource
    ===================

    Gettinglibusermetrics
    ----------------------

    LibusermetricsisaprojectonGitLab(https://gitlab.com/ubports/core/libusermetrics).
    Tograbacopyusethecommand:

    $gitclonehttps://gitlab.com/ubports/core/libusermetrics.git

    Gettingdependencies
    --------------------

    Tosuccesfullybuildlibusermetricsthereareafewpackagesrequired.The
    easiestwaytogetthemistousethepackagingbuilddependencies:

    $sudoapt-getinstalldevscriptsequivscmake
    $sudomk-build-deps--install--tool"apt-get-y"--build-depdebian/control

    Buildinglibusermetrics
    -----------------------

    Libusermetricsisbuiltusingcmake.Tomakelifesimpler,youcanusethe
    includedwrapperscript:

    $./build

    Thiswillruncmakeinthedirectory

    ../${BRANCH_NAME}-build

    YoucanalsoaskittocreateanEclipseprojectasfollows:

    $./build-e

    Thenextstepistobuildthesourceandrunthetests:

    $cd../libusermetrics-build/make(-j8)
    $makecheck

    Installinglibusermetrics
    -------------------------

    Toinstalllibusermetricsjustusethenormalmakeinstallcommand:

    $makeinstall

    Thiswillinstallthelibusermetricsinput/outputlibraries,storageservice,
    andheaderfilestotheconfiguredinstallationlocation(/usr/localby
    default).Ifyouinstalltoanon-standardlocation,keepinmindthatyouwill
    probablyneedtoproperlysetthePKG_CONFIG_PATHenvironmentvariabletoallow
    otherapplicationstobuildagainstlibusermetrics,andLD_LIBRARY_PATHtoallow
    applicationstofindthelibusermetricslibrariesatruntime.