File: CMakeLists.txt

package info (click to toggle)
lief 0.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid
  • size: 16,036 kB
  • sloc: cpp: 76,013; python: 6,167; ansic: 3,355; pascal: 404; sh: 98; makefile: 32
file content (75 lines) | stat: -rw-r--r-- 2,513 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
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
66
67
68
69
70
71
72
73
74
75
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF/OAT/enums.inc      LIEF_OAT_ENUMS)
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF/OAT/structures.inc LIEF_OAT_STRUCTURES)

configure_file(
  ${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF/OAT/enums.hpp.in
  ${CMAKE_CURRENT_BINARY_DIR}/include/LIEF/OAT/enums.hpp
  @ONLY
)

configure_file(
  ${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF/OAT/Structures.hpp.in
  ${CMAKE_CURRENT_BINARY_DIR}/include/LIEF/OAT/Structures.hpp
  @ONLY
)

set(LIEF_OAT_SRC
  ${CMAKE_CURRENT_LIST_DIR}/Parser.cpp
  ${CMAKE_CURRENT_LIST_DIR}/oat_64.tcc
  ${CMAKE_CURRENT_LIST_DIR}/oat_79.tcc
  ${CMAKE_CURRENT_LIST_DIR}/oat_131.tcc
  ${CMAKE_CURRENT_LIST_DIR}/oat_124.tcc
  ${CMAKE_CURRENT_LIST_DIR}/Parser.cpp
  ${CMAKE_CURRENT_LIST_DIR}/Parser.tcc
  ${CMAKE_CURRENT_LIST_DIR}/Binary.cpp
  ${CMAKE_CURRENT_LIST_DIR}/Header.cpp
  ${CMAKE_CURRENT_LIST_DIR}/DexFile.cpp
  ${CMAKE_CURRENT_LIST_DIR}/Class.cpp
  ${CMAKE_CURRENT_LIST_DIR}/Method.cpp
  ${CMAKE_CURRENT_LIST_DIR}/Header.tcc
  ${CMAKE_CURRENT_LIST_DIR}/EnumToString.cpp
  ${CMAKE_CURRENT_LIST_DIR}/utils.cpp
  ${CMAKE_CURRENT_LIST_DIR}/hash.cpp
)

set(LIEF_OAT_INC_FILES
  "${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF/OAT/Header.hpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF/OAT/Binary.hpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF/OAT/DexFile.hpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF/OAT/Class.hpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF/OAT/Method.hpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF/OAT/Parser.hpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF/OAT/type_traits.hpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF/OAT/utils.hpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF/OAT/EnumToString.hpp"
  "${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF/OAT/hash.hpp"

  "${CMAKE_CURRENT_BINARY_DIR}/include/LIEF/OAT/Structures.hpp"
  "${CMAKE_CURRENT_BINARY_DIR}/include/LIEF/OAT/enums.hpp"
)


# JSON Part
# =========
set(LIEF_OAT_JSON_SRC "${CMAKE_CURRENT_LIST_DIR}/json.cpp")
set(LIEF_OAT_JSON_HDR "${CMAKE_CURRENT_SOURCE_DIR}/include/LIEF/OAT/json.hpp")

if (LIEF_ENABLE_JSON)
  list(APPEND LIEF_OAT_SRC       ${LIEF_OAT_JSON_SRC})
  list(APPEND LIEF_OAT_INC_FILES ${LIEF_OAT_JSON_HDR})
endif()

source_group("Source Files\\OAT" FILES ${LIEF_OAT_SRC})
source_group("Header Files\\OAT" FILES ${LIEF_OAT_INC_FILES})

if (LIEF_OAT)
  target_sources(LIB_LIEF_STATIC PRIVATE
    ${LIEF_OAT_SRC}
    ${LIEF_OAT_INC_FILES}
  )

  target_sources(LIB_LIEF_SHARED PRIVATE
    ${LIEF_OAT_SRC}
    ${LIEF_OAT_INC_FILES}
  )
endif()