forked from googleprojectzero/winafl
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
executable file
·88 lines (62 loc) · 1.52 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
cmake_minimum_required(VERSION 2.6)
if (${USE_COLOR})
add_definitions(-DUSE_COLOR)
endif()
project(test)
add_executable(test
test.cpp
)
if(NOT "${CMAKE_GENERATOR}" MATCHES "(Win64)")
project(test_static)
add_executable(test_static
test_static.cpp
afl-staticinstr.c
)
target_link_libraries(test_static "psapi.lib")
set_target_properties(test_static PROPERTIES COMPILE_FLAGS "/EHsc")
set_target_properties(test_static PROPERTIES LINK_FLAGS "/PROFILE")
endif()
project(test_gdiplus)
add_executable(test_gdiplus
gdiplus.cpp
)
target_link_libraries(test_gdiplus gdiplus)
project(afl-showmap)
add_executable(afl-showmap
afl-showmap.c
)
project(afl-fuzz)
add_executable(afl-fuzz
afl-fuzz.c
)
project(afl-tmin)
add_executable(afl-tmin
afl-tmin.c
)
project(WinAFL)
set(DynamoRIO_LOG_COMPATIBILITY on)
find_package(DynamoRIO)
if (NOT DynamoRIO_FOUND)
message(FATAL_ERROR "DynamoRIO package required to build")
endif(NOT DynamoRIO_FOUND)
if (STATIC_LIBRARY)
set(libtype STATIC)
else()
set(libtype SHARED)
endif ()
add_library(winafl ${libtype}
winafl.c
modules.c
)
configure_DynamoRIO_client(winafl)
use_DynamoRIO_extension(winafl drmgr)
use_DynamoRIO_extension(winafl drx)
use_DynamoRIO_extension(winafl drcontainers)
use_DynamoRIO_extension(winafl drreg)
use_DynamoRIO_extension(winafl drwrap)
use_DynamoRIO_extension(winafl drsyms)
# VS2015 Fix
if (NOT (MSVC_VERSION LESS 1900))
target_link_libraries(winafl "libucrt.lib")
target_link_libraries(winafl "libvcruntime.lib")
endif()