-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
56 lines (43 loc) · 1.21 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
cmake_minimum_required(VERSION 3.27)
option(NYU_SKIP_VCPKG "Do not fetch vcpkg" OFF)
option(NYU_BUILD_TESTS "Generate tests" OFF)
option(NYU_GEN_TRACES "Generate FST traces from tests" OFF)
option(NYU_GEN_COV "Generate coverage information from tests" OFF)
if(NYU_GEN_TRACES)
set(_traces_option TRACE_FST)
else()
set(_traces_option)
endif()
if(NYU_GEN_COV)
set(_cov_option COVERAGE)
else()
set(_cov_option)
endif()
include(cmake/BootstrapVcpkg.cmake)
project(purdnyuart VERSION 2.0.3)
find_package(nyu-cmake CONFIG REQUIRED)
add_library(uart INTERFACE)
add_subdirectory(rtl)
if(NYU_BUILD_TESTS)
enable_testing()
add_subdirectory(dv)
endif()
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
nyu_install_sv(
EXPORT purdnyuartTargets
TARGETS uart
NAMESPACE nyu::
EXPORT_DEST ${CMAKE_INSTALL_DATADIR}/purdnyuart
SV_DEST ${CMAKE_INSTALL_DATADIR}/purdnyuart/rtl
)
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/purdnyuart-config-version.cmake
COMPATIBILITY ExactVersion
ARCH_INDEPENDENT
)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/cmake/purdnyuart-config.cmake
${CMAKE_CURRENT_BINARY_DIR}/purdnyuart-config-version.cmake
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/purdnyuart
)