Skip to content

Build Liblogicalaccess

Holocrons edited this page Mar 14, 2020 · 2 revisions

General note

The library is available on Windows and Linux operating systems.

We use cmake as built system.

Be aware about the following dependencies:

  • openssl: cryptographic library
  • boost: cross-platform C++ extension library

The “Basic” sample is a good example on how to use this library (includes, link …). You should get the dependencies and configure the project directories to build it correctly. (liblogicalaccess/sample/basic)

Linux Build

To build the library you will need to create a conanfile.txt and a CMakeList.txt inside your project folder. example of a conanfile.txt:

[requires]
LogicalAccess/2.1.0@islog/master

[generators]
cmake

[imports]
lib, * -> lib

example of a CMakeList.txt:

project(test)
cmake_minimum_required(VERSION 3.16)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)
set(CMAKE_CXX_FLAGS "-I /usr/include/PCSC")
add_executable(test main.cpp)
target_link_libraries(test PUBLIC CONAN_PKG::LogicalAccess)

To build your project use the following commands:

mkdir build ; cd build ; conan install .. ; cmake build ..
cmake --build .

Windows Build

Every dependency is available on a Maven repository provided by ISLOG or could be downloaded separately from their author.

Be aware about the following additional reader dependencies on Windows:

CMake installation

Download CMake Win32 installer from the website and install it.\ Choose to add CMake on your PATH.

Because we use Visual Studio 2012 by default on build scripts and if you want to also target Windows XP / Windows Server 2003 operating systems with v110_xp toolset, then please install CMake >= 2.8.11.

We have made different scripts (in the folder scripts) to help the build on windows:

Generate[Win32\X64]Solutions.bat //Create the solutions for Relase mode
Generate[Win32\X64]Solutions-debug.bat //Create the solutions for Debug mode
Generate[Win32\X64]BasicSolution.bat //Create the solutions for sample code (samples/basic)
cleancmake.bat //use it to clean the CMakeCache.txt and CMakeFiles folder before switch to another Arch/Build mode.