forked from liftoff-sr/rockchip-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
65 lines (45 loc) · 1.15 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
55
56
57
58
59
60
61
62
63
64
65
if( DEFINED CMAKE_BUILD_TYPE )
set( CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Set to either \"Release\" or \"Debug\"" )
else()
set( CMAKE_BUILD_TYPE Release CACHE STRING "Set to either \"Release\" or \"Debug\"" )
endif()
project( rk-tools )
cmake_minimum_required( VERSION 2.8.12 FATAL_ERROR )
find_package( OpenSSL REQUIRED )
include_directories( ${OPENSSL_INCLUDE_DIR} )
set( CMAKE_C_FLAGS_DEBUG "-g3 -ggdb3 -DDEBUG" )
set( CMAKE_CXX_FLAGS_DEBUG "-g3 -ggdb3 -DDEBUG" )
# needed for std::map initializer
set( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -std=gnu++11 )
add_definitions(
-DUSE_OPENSSL
-Wno-unused-result
-D_FILE_OFFSET_BITS=64
)
add_executable( afptool
afptool.cpp
)
add_executable( img_maker
img_maker.cpp
)
target_link_libraries( img_maker
${OPENSSL_CRYPTO_LIBRARY}
)
add_executable( img_unpack
img_unpack.cpp
)
target_link_libraries( img_unpack
${OPENSSL_CRYPTO_LIBRARY}
)
add_executable( rkkernel
rkkernel.cpp
)
add_executable( rkcrc
rkcrc.cpp
)
install(
TARGETS
afptool img_maker img_unpack rkkernel rkcrc
DESTINATION
bin
)