-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
60 lines (54 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
# Copyright 2023 Ettus Research, A National Instruments Brand
#
# SPDX-License-Identifier: GPL-3.0-or-later
cmake_minimum_required(VERSION 3.16)
project(
multichannel_awg
VERSION 0.0.1
LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
# Packaging support
set(CPACK_PACKAGE_VENDOR "Ettus Research")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Multichannel AWG based on UHD4")
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
find_package(UHD 4.2.0 REQUIRED)
if(NOT TARGET UHD::UHD)
add_library(UHD::UHD INTERFACE IMPORTED)
set_target_properties(
UHD::UHD PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${UHD_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${UHD_LIBRARIES}")
endif()
message(STATUS "Found UHD ${UHD_VERSION}")
include(FetchContent)
message(STATUS "Preparing {fmt}")
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt
GIT_TAG 9.0.0)
FetchContent_MakeAvailable(fmt)
message(STATUS "Prepared {fmt}")
# We're not using the CLI11 submodule – its CMake build is too noisy for customer-facing software
# message(STATUS "Preparing CLI11")
# FetchContent_Declare(
# clilib
# QUIET
# GIT_REPOSITORY https://github.com/CLIUtils/CLI11.git
# GIT_TAG v1.9.0
# )
# FetchContent_MakeAvailable(clilib)
# message(STATUS "Prepared CLI11")
message(STATUS "Preparing nlohmann_json")
FetchContent_Declare(
json URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz)
FetchContent_MakeAvailable(json)
message(STATUS "Prepared nlohmann_json")
#Here goes the actual work
add_subdirectory(src)
# Include cpack at the end
message(STATUS "Preparing CPack")
include(CPack)
message(STATUS "Prepared CPack")