-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
50 lines (35 loc) · 1.31 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
cmake_minimum_required(VERSION 3.5)
include(cmake/platform.cmake)
set(USE_ASM ON CACHE BOOL "Use asm implementation for Fr and Fq")
project(witnesscalc LANGUAGES CXX ASM)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
message("USE_ASM=" ${USE_ASM})
message("CMAKE_CROSSCOMPILING=" ${CMAKE_CROSSCOMPILING})
message("GMP_PREFIX=" ${GMP_PREFIX})
message("GMP_INCLUDE_DIR=" ${GMP_INCLUDE_DIR})
message("GMP_LIB_DIR=" ${GMP_LIB_DIR})
if (NOT EXISTS ${GMP_INCLUDE_FILE_FULLPATH})
message("WARNING: ${GMP_INCLUDE_FILE_FULLPATH} is not found and so system ${GMP_INCLUDE_FILE} is used.")
endif()
if (NOT EXISTS ${GMP_LIB_FILE_FULLPATH})
message("WARNING: ${GMP_LIB_FILE_FULLPATH} is not found and so system ${GMP_LIB_FILE} is used.")
set(GMP_LIB gmp)
endif()
include_directories(BEFORE ${GMP_INCLUDE_DIR})
add_subdirectory(src)
install(TARGETS
circuit
witnesscalc_circuitStatic
fr
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
BUNDLE DESTINATION ${CMAKE_INSTALL_PREFIX}/app
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install(FILES "${GMP_LIB_DIR}/${GMP_LIB_FILE}"
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install(FILES
src/circuit.dat
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(FILES
src/witnesscalc.h
DESTINATION ${CMAKE_INSTALL_PREFIX}/include)