-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
54 lines (42 loc) · 1.55 KB
/
CMakeLists.txt
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
# CMake configuraiton file
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT("aml-npu-sdk")
IF(NOT DEFINED FULLVER)
SET(FULLVER "6.4.0.10")
ENDIF(NOT DEFINED FULLVER)
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
IF(NOT DEFINED BINDIR)
SET(BINDIR "${PREFIX}/bin")
ENDIF(NOT DEFINED BINDIR)
IF(NOT DEFINED LIBDIR)
SET(LIBDIR "${PREFIX}/lib")
ENDIF(NOT DEFINED LIBDIR)
IF(NOT DEFINED PCDIR)
SET(PCDIR "${PREFIX}/lib/pkgconfig")
ENDIF(NOT DEFINED PCDIR)
IF(NOT DEFINED INCDIR)
SET(INCDIR "${PREFIX}/include/${PROJECT_NAME}")
ENDIF(NOT DEFINED INCDIR)
SET(pc_dependents "")
SET(PC_NAME ${PROJECT_NAME})
SET(PC_REQUIRED ${pc_dependents})
SET(PC_LDFLAGS "-lOpenVX -lOpenVXU -lCLC -lVSC -lGAL -lm -lrt")
SET(PC_DESCRIPTION "Amlogic Verisilicon NPU SDK Library")
CONFIGURE_FILE(
${PROJECT_NAME}.pc.in
${PROJECT_NAME}.pc
@ONLY
)
IF("${ARCH}" STREQUAL "arm")
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib32/ DESTINATION ${LIBDIR}
FILES_MATCHING PATTERN "*.so")
ELSE("${ARCH}" STREQUAL "arm")
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib64/ DESTINATION ${LIBDIR}
FILES_MATCHING PATTERN "*.so")
ENDIF("${ARCH}" STREQUAL "arm")
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION ${INCDIR}
FILES_MATCHING PATTERN "*.h")
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/nngpu_kernels DESTINATION ${INCDIR})
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/nnvxc_kernels DESTINATION ${INCDIR})
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ovx12_vxcKernels DESTINATION ${INCDIR})
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${PCDIR})