-
Notifications
You must be signed in to change notification settings - Fork 15
/
CMakeLists.txt
78 lines (64 loc) · 3.11 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
cmake_minimum_required(VERSION 2.8.12)
project(crete)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
include_directories("${PROJECT_SOURCE_DIR}/lib/include" "${CMAKE_BINARY_DIR}/lib/boost/boost-prefix/src/boost_1_59_0")
link_directories("${CMAKE_BINARY_DIR}/lib/boost/boost-prefix/src/boost_1_59_0/stage/lib")
add_subdirectory(lib)
add_subdirectory(back-end)
add_subdirectory(front-end)
add_subdirectory(misc)
add_subdirectory(test EXCLUDE_FROM_ALL)
add_custom_target(crete-version ALL
COMMAND git rev-parse --short HEAD > CRETE-VERSION
COMMAND cp ./CRETE-VERSION ${CMAKE_CURRENT_SOURCE_DIR}/front-end/guest/CRETE-VERSION
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
install (PROGRAMS "${PROJECT_SOURCE_DIR}/back-end/klee/Release+Asserts/bin/klee"
DESTINATION bin
PERMISSIONS WORLD_EXECUTE WORLD_READ
OWNER_READ OWNER_WRITE OWNER_EXECUTE
RENAME crete-klee)
install (DIRECTORY "${PROJECT_SOURCE_DIR}/back-end/klee/Release+Asserts/lib/"
DESTINATION lib
PATTERN "*.bc"
PATTERN ".svn" EXCLUDE
PERMISSIONS WORLD_READ OWNER_READ OWNER_WRITE)
install (PROGRAMS "${PROJECT_SOURCE_DIR}/front-end/qemu-2.3/x86_64-softmmu/crete-qemu-2.3-system-x86_64"
DESTINATION bin
PERMISSIONS WORLD_EXECUTE WORLD_READ
OWNER_READ OWNER_WRITE OWNER_EXECUTE)
install (PROGRAMS "${PROJECT_SOURCE_DIR}/back-end/llvm-translator/llvm-translator-qemu-2.3/x86_64-softmmu/crete-llvm-translator-x86_64"
DESTINATION bin
PERMISSIONS WORLD_EXECUTE WORLD_READ
OWNER_READ OWNER_WRITE OWNER_EXECUTE
RENAME crete-llvm-translator-qemu-2.3-x86_64)
install (FILES "${PROJECT_SOURCE_DIR}/back-end/llvm-translator/llvm-translator-qemu-2.3/x86_64-softmmu/bc_target_x86_64_helpers.bc"
DESTINATION bin
PERMISSIONS WORLD_READ OWNER_READ OWNER_WRITE
RENAME crete-qemu-2.3-op-helper-x86_64.bc)
install (DIRECTORY "/home/chenbo/MSoftware/libs/boost_1_59_0/stage/lib/"
DESTINATION lib
PATTERN ".*.1.59.0"
PERMISSIONS WORLD_READ OWNER_READ OWNER_WRITE)
## Pack libicu48 so that the deb package can be used on ubuntu 12.04 and 14.04
install (FILES "/usr/lib/libicuuc.so.48"
"/usr/lib/libicui18n.so.48"
"/usr/lib/libicuuc.so.48.1.1"
"/usr/lib/libicui18n.so.48.1.1"
"/usr/lib/libicudata.so.48"
"/usr/lib/libicudata.so.48.1.1"
DESTINATION lib
PERMISSIONS WORLD_READ OWNER_READ OWNER_WRITE)
# cpack
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CRETE")
SET(CPACK_PACKAGE_VENDOR "System Validation Laboratory, Portland State University")
# SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.TXT")
SET(CPACK_PACKAGE_VERSION_MAJOR "0")
SET(CPACK_PACKAGE_VERSION_MINOR "1")
SET(CPACK_PACKAGE_VERSION_PATCH "1")
SET(CPACK_SET_DESTDIR "ON")
SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Bo Chen (chenbo@pdx.edu)") #required
INCLUDE(CPack)