File: CMakeLists.txt

package info (click to toggle)
mrtdreader 0.1.6-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid
  • size: 248 kB
  • sloc: ansic: 1,300; sh: 15; makefile: 4
file content (36 lines) | stat: -rw-r--r-- 1,094 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
cmake_minimum_required (VERSION 2.6)

SET(CMAKE_BUILD_TYPE Release CACHE STRING "If build type is not specified on command line, build Release")

project (mrtdreader)

find_package(PkgConfig)
INCLUDE(CheckIncludeFiles)

pkg_check_modules(NFC libnfc)
CHECK_INCLUDE_FILES(gcrypt.h HAVE_GCRYPT)

if(NOT NFC_FOUND)
    MESSAGE(FATAL_ERROR "The development files for libnfc are needed")
endif()

if(NOT HAVE_GCRYPT)
    MESSAGE(FATAL_ERROR "The development files for libgcrypt are needed")
endif()

set(MRTD_VERSION 0.1.6)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})

CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)

CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mrtd.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mrtd.pc)

if(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mrtd.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig)
else()
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mrtd.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
endif()

add_subdirectory(src)
add_subdirectory(test)