-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·78 lines (64 loc) · 1.92 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 3.8.0)
project(BinaryTensor)
include(GNUInstallDirs)
set(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR})
install(
DIRECTORY "${CMAKE_SOURCE_DIR}/src/binary_tensor"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT headers
FILES_MATCHING
PATTERN "*.hh"
PATTERN "*.h"
)
add_subdirectory("src/binary_tensor/core")
add_subdirectory("test")
enable_testing()
add_test(
NAME TestBinary
COMMAND binarytensor_test)
set(CPACK_PACKAGE_NAME "BinaryTensor")
set(CPACK_PACKAGE_VENDOR "TensorArray-Creators")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY)
set(CPACK_PACKAGE_VERSION "0.1.0")
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "1")
set(CPACK_PACKAGE_VERSION_PATCH "0")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "A machine learning libraries")
install(
EXPORT BinaryTensorTargets
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/BinaryTensor
NAMESPACE BinaryTensor::
FILE BinaryTensorTargets.cmake
)
include(CMakePackageConfigHelpers)
configure_package_config_file(
"Config.cmake.in"
"BinaryTensorConfig.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/BinaryTensor
PATH_VARS CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_INCLUDEDIR
)
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/BinaryTensorConfigVersion.cmake
VERSION 0.1.0
COMPATIBILITY SameMajorVersion
)
### Install Config and ConfigVersion files
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/BinaryTensorConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/BinaryTensorConfigVersion.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/BinaryTensor
)
include(CPack)
cpack_add_component(libraries
DISPLAY_NAME "Libraries"
GROUP Development)
cpack_add_component(
headers
DISPLAY_NAME "C++ Headers"
GROUP Development)
cpack_add_component_group(
Development
EXPANDED
PROJECT_DESCRIPTION
"All of the tools you'll ever need to develop software")