Integrate license manager in your application

How to setup your project and link the static LM library into your software.

How to setup CMakeLists.txt

You set the correct name of your project, update the following line SET(LCC_PROJECT_NAME LicenseDemoApp)

Below some important updates you should make to your CMakeLists.txt

if (CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
    set(LICENSECC_INSTALLATION_DIR "/home/ccs/git/license-manager/install-imx8/")
else()
    set(LICENSECC_INSTALLATION_DIR "/home/ccs/git/license-manager/install/")
endif()

set(licensecc_DIR "${LICENSECC_INSTALLATION_DIR}/lib/cmake/licensecc")

SET(LCC_PROJECT_NAME LicenseDemoApp)

IF(NOT LCC_PROJECT_NAME)
                message(STATUS "You should define a variable LCC_PROJECT_NAME matching the choice you made when you compiled licensecc.\n
                 We're supposing you're using DEFAULT as a project name. Use `lccgen project create` to create new projects.")
        set(LCC_PROJECT_NAME "DEFAULT" CACHE STRING "Project name (name of the software for which you want to issue a license)")
ENDIF(NOT LCC_PROJECT_NAME)

find_package(licensecc 2.0.0 REQUIRED)

# Also update the linked library, add the PRIVATE licensecc::licensecc_static 
target_link_libraries(appJustTestingLicenseManager
    PRIVATE Qt6::Quick
    PRIVATE licensecc::licensecc_static)

Pointing out the installed license manager

If you follow the build example you would probably have two installation folders. Replace the path’s in the example above (the following two lines) with your own install folder paths.
set(LICENSECC_INSTALLATION_DIR “/home/ccs/git/license-manager/install-imx8/”) set(LICENSECC_INSTALLATION_DIR “/home/ccs/git/license-manager/install/”)

How to verify license will be covered in the code examples section.