File: CMakeLists.txt

package info (click to toggle)
optee-client 4.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 932 kB
  • sloc: ansic: 11,409; makefile: 410; xml: 113; sh: 33
file content (59 lines) | stat: -rw-r--r-- 1,762 bytes parent folder | download | duplicates (3)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
project(teeacl
	VERSION 0.1.0
	LANGUAGES C
)

include(GNUInstallDirs)

################################################################################
# Source files
################################################################################
set(SRC
	src/group.c
	src/tee_uuid.c
)

################################################################################
# Built library
################################################################################
add_library(teeacl ${SRC})

configure_file(teeacl.pc.in teeacl.pc @ONLY)

set_target_properties(teeacl PROPERTIES
	VERSION ${PROJECT_VERSION}
	SOVERSION ${PROJECT_VERSION_MAJOR}
)

################################################################################
# Flags always set
################################################################################
target_compile_definitions(teeacl
	PRIVATE -D_GNU_SOURCE
	PRIVATE -DBINARY_PREFIX="LT"
)

################################################################################
# Public and private header and library dependencies
################################################################################
target_include_directories(teeacl PUBLIC
	$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
	$<INSTALL_INTERFACE:include>
)

target_link_libraries(teeacl
	PUBLIC PkgConfig::uuid
)

################################################################################
# Install targets
################################################################################
install(TARGETS teeacl
	DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/teeacl.pc"
	DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
)