forked from samr7/vanitygen
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathCMakeLists.txt
98 lines (80 loc) · 1.9 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
88
89
90
91
92
93
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(vanitygen)
SET(CMAKE_THREAD_PREFER_PTHREAD True)
LIST(APPEND CMAKE_MODULE_PATH "${vanitygen_SOURCE_DIR}/cmake")
IF(NOT VG_OCL_SOURCE_PREFIX)
SET(VG_OCL_SOURCE_PREFIX ${vanitygen_SOURCE_DIR}/)
ENDIF(NOT VG_OCL_SOURCE_PREFIX)
FIND_PACKAGE(OpenSSL REQUIRED)
FIND_PACKAGE(Threads REQUIRED)
FIND_PACKAGE(PCRE REQUIRED)
FIND_PACKAGE(CURL)
FIND_PACKAGE(OpenCL)
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${PCRE_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
SET(DEBUG OFF)
SET(USE_OPENCL OFF)
IF(DEBUG)
SET(OFLAGS "-ggdb3")
ELSE(DEBUG)
SET(OFLAGS "-O4 -march=native")
ENDIF(DEBUG)
SET(CMAKE_C_FLAGS "${OFLAGS} -Wall")
SET(VANY_LIBS
${PCRE_LIBRARIES}
${OPENSSL_LIBRARIES}
m
${CMAKE_THREAD_LIBS_INIT}
)
ADD_EXECUTABLE(vanitygen
vanitygen.c
pattern.c
util.c
)
TARGET_LINK_LIBRARIES(vanitygen
${VANY_LIBS}
)
INSTALL(TARGETS vanitygen RUNTIME DESTINATION bin)
ADD_EXECUTABLE(keyconv
keyconv.c
util.c
)
TARGET_LINK_LIBRARIES(keyconv
${VANY_LIBS}
)
INSTALL(TARGETS keyconv RUNTIME DESTINATION bin)
IF(OPENCL_FOUND)
INCLUDE_DIRECTORIES(${OPENCL_INCLUDE_DIRS})
ADD_EXECUTABLE(oclvanitygen
oclvanitygen.c
oclengine.c
pattern.c
util.c
)
TARGET_LINK_LIBRARIES(oclvanitygen
${VANY_LIBS}
${OPENCL_LIBRARIES}
)
SET_TARGET_PROPERTIES(oclvanitygen PROPERTIES
# VERSION
COMPILE_DEFINITIONS VG_OCL_SOURCE_PREFIX="${VG_OCL_SOURCE_PREFIX}/"
)
INSTALL(TARGETS oclvanitygen RUNTIME DESTINATION bin)
INSTALL(FILES calc_addrs.cl DESTINATION share/vanitygen/scripts)
IF(CURL_FOUND)
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
ADD_EXECUTABLE(oclvanityminer
oclvanityminer.c
oclengine.c
pattern.c
util.c
)
TARGET_LINK_LIBRARIES(oclvanityminer
${VANY_LIBS}
${OPENCL_LIBRARIES}
${CURL_LIBRARIES}
)
INSTALL(TARGETS oclvanityminer RUNTIME DESTINATION bin)
ENDIF(CURL_FOUND)
ENDIF(OPENCL_FOUND)