forked from facebook/redex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
71 lines (55 loc) · 1.41 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
66
67
68
69
70
71
cmake_minimum_required(VERSION 3.0.2)
project("Redex")
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
include(Commons)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif ()
set_common_cxx_flags_for_redex()
add_dependent_packages_for_redex()
file(GLOB includes
"libredex"
"opt/*"
"util"
"liblocator"
"libresource"
)
include_directories(
${Boost_INCLUDE_DIRS}
${JSONCPP_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
${includes})
file(GLOB_RECURSE redex_srcs
"libredex/*.cpp"
"libredex/*.h"
"opt/*.cpp"
"opt/*.h"
"util/Sha1.*"
"liblocator/*.cpp"
"liblocator/*.h"
)
add_library(redex STATIC ${redex_srcs})
file(GLOB_RECURSE tool_srcs
"tools/tool/*.cpp"
"tools/tool/*.h"
)
add_library(tool STATIC ${tool_srcs})
file(GLOB_RECURSE resource_srcs
"libresource/*.cpp"
"libresource/*.h"
)
add_library(resource STATIC ${resource_srcs})
file(GLOB redex_all_srcs
"tools/redex-all/*.cpp"
"tools/redex-all/*.h"
)
add_executable(redex-all ${redex_all_srcs})
target_link_libraries(redex-all
${Boost_LIBRARIES}
${JSONCPP_LIBRARY}
${ZLIB_LIBRARIES}
redex
resource
)
target_compile_definitions(redex-all PRIVATE)
set_link_whole(redex-all redex)