forked from sony/nmos-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNmosCppLibraries.cmake
1010 lines (910 loc) · 47.2 KB
/
NmosCppLibraries.cmake
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
include(CMakeRegexEscape)
string(REGEX REPLACE ${REPLACE_MATCH} ${REPLACE_REPLACE} CMAKE_CURRENT_BINARY_DIR_REPLACE "${CMAKE_CURRENT_BINARY_DIR}")
# detail headers
set(DETAIL_HEADERS
detail/default_init_allocator.h
detail/for_each_reversed.h
detail/pragma_warnings.h
detail/private_access.h
)
install(FILES ${DETAIL_HEADERS} DESTINATION ${NMOS_CPP_INSTALL_INCLUDEDIR}/detail)
# slog library
# compile-time control of logging loquacity
# use slog::never_log_severity to strip all logging at compile-time, or slog::max_verbosity for full control at run-time
set(SLOG_LOGGING_SEVERITY slog::max_verbosity CACHE STRING "Compile-time logging level, e.g. between 40 (least verbose, only fatal messages) and -40 (most verbose)")
mark_as_advanced(FORCE SLOG_LOGGING_SEVERITY)
set(SLOG_HEADERS
slog/all_in_one.h
)
add_library(slog INTERFACE)
target_compile_definitions(
slog INTERFACE
SLOG_STATIC
SLOG_LOGGING_SEVERITY=${SLOG_LOGGING_SEVERITY}
)
if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
target_compile_definitions(
slog INTERFACE
SLOG_DETAIL_NO_REF_QUALIFIERS
)
endif()
endif()
target_include_directories(slog INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${NMOS_CPP_INSTALL_INCLUDEDIR}>
)
install(FILES ${SLOG_HEADERS} DESTINATION ${NMOS_CPP_INSTALL_INCLUDEDIR}/slog)
list(APPEND NMOS_CPP_TARGETS slog)
add_library(nmos-cpp::slog ALIAS slog)
# mDNS support library
set(MDNS_SOURCES
mdns/core.cpp
mdns/dns_sd_impl.cpp
mdns/service_advertiser_impl.cpp
mdns/service_discovery_impl.cpp
)
set(MDNS_HEADERS
mdns/core.h
mdns/dns_sd_impl.h
mdns/service_advertiser.h
mdns/service_advertiser_impl.h
mdns/service_discovery.h
mdns/service_discovery_impl.h
)
add_library(
mdns STATIC
${MDNS_SOURCES}
${MDNS_HEADERS}
)
source_group("mdns\\Source Files" FILES ${MDNS_SOURCES})
source_group("mdns\\Header Files" FILES ${MDNS_HEADERS})
target_link_libraries(
mdns PRIVATE
nmos-cpp::compile-settings
)
target_link_libraries(
mdns PUBLIC
nmos-cpp::slog
nmos-cpp::cpprestsdk
nmos-cpp::Boost
)
# CMake 3.17 is required in order to get the INTERFACE_LINK_OPTIONS
# see https://cmake.org/cmake/help/latest/policy/CMP0099.html
target_link_libraries(
mdns PRIVATE
nmos-cpp::DNSSD
)
target_include_directories(mdns PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${NMOS_CPP_INSTALL_INCLUDEDIR}>
)
install(FILES ${MDNS_HEADERS} DESTINATION ${NMOS_CPP_INSTALL_INCLUDEDIR}/mdns)
list(APPEND NMOS_CPP_TARGETS mdns)
add_library(nmos-cpp::mdns ALIAS mdns)
# LLDP support library
if(NMOS_CPP_BUILD_LLDP)
set(LLDP_SOURCES
lldp/lldp.cpp
lldp/lldp_frame.cpp
lldp/lldp_manager_impl.cpp
)
set(LLDP_HEADERS
lldp/lldp.h
lldp/lldp_frame.h
lldp/lldp_manager.h
)
add_library(
lldp STATIC
${LLDP_SOURCES}
${LLDP_HEADERS}
)
source_group("lldp\\Source Files" FILES ${LLDP_SOURCES})
source_group("lldp\\Header Files" FILES ${LLDP_HEADERS})
target_link_libraries(
lldp PRIVATE
nmos-cpp::compile-settings
)
target_link_libraries(
lldp PUBLIC
nmos-cpp::slog
nmos-cpp::cpprestsdk
)
target_link_libraries(
lldp PRIVATE
nmos-cpp::PCAP
nmos-cpp::Boost
)
target_include_directories(lldp PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${NMOS_CPP_INSTALL_INCLUDEDIR}>
)
target_compile_definitions(
lldp INTERFACE
HAVE_LLDP
)
install(FILES ${LLDP_HEADERS} DESTINATION ${NMOS_CPP_INSTALL_INCLUDEDIR}/lldp)
list(APPEND NMOS_CPP_TARGETS lldp)
add_library(nmos-cpp::lldp ALIAS lldp)
endif()
# nmos_is04_schemas library
set(NMOS_IS04_SCHEMAS_HEADERS
nmos/is04_schemas/is04_schemas.h
)
set(NMOS_IS04_V1_3_TAG v1.3.x)
set(NMOS_IS04_V1_2_TAG v1.2.x)
set(NMOS_IS04_V1_1_TAG v1.1.x)
set(NMOS_IS04_V1_0_TAG v1.0.x)
set(NMOS_IS04_V1_3_SCHEMAS_JSON
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/clock_internal.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/clock_ptp.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/device.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/devices.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/error.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/flow.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/flows.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/flow_audio.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/flow_audio_coded.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/flow_audio_raw.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/flow_core.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/flow_data.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/flow_json_data.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/flow_mux.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/flow_sdianc_data.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/flow_video.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/flow_video_coded.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/flow_video_raw.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/node.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/nodeapi-base.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/nodeapi-receiver-target.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/nodes.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/queryapi-base.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/queryapi-subscription-response.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/queryapi-subscriptions-post-request.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/queryapi-subscriptions-response.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/queryapi-subscriptions-websocket.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/receiver.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/receivers.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/receiver_audio.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/receiver_core.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/receiver_data.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/receiver_mux.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/receiver_video.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/registrationapi-base.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/registrationapi-health-response.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/registrationapi-resource-post-request.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/registrationapi-resource-response.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/resource_core.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/sender.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/senders.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/source.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/sources.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/source_audio.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/source_core.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/source_data.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_3_TAG}/APIs/schemas/source_generic.json
)
set(NMOS_IS04_V1_2_SCHEMAS_JSON
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/clock_internal.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/clock_ptp.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/device.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/devices.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/error.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/flow.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/flows.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/flow_audio.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/flow_audio_coded.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/flow_audio_raw.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/flow_core.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/flow_data.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/flow_mux.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/flow_sdianc_data.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/flow_video.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/flow_video_coded.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/flow_video_raw.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/node.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/nodeapi-base.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/nodeapi-receiver-target.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/nodes.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/queryapi-base.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/queryapi-subscription-response.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/queryapi-subscriptions-post-request.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/queryapi-subscriptions-response.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/queryapi-subscriptions-websocket.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/receiver.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/receivers.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/receiver_audio.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/receiver_core.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/receiver_data.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/receiver_mux.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/receiver_video.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/registrationapi-base.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/registrationapi-health-response.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/registrationapi-resource-post-request.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/registrationapi-resource-response.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/resource_core.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/sender.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/senders.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/source.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/sources.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/source_audio.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/source_core.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_2_TAG}/APIs/schemas/source_generic.json
)
set(NMOS_IS04_V1_1_SCHEMAS_JSON
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/clock_internal.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/clock_ptp.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/device.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/devices.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/error.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/flow.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/flows.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/flow_audio.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/flow_audio_coded.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/flow_audio_raw.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/flow_core.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/flow_data.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/flow_mux.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/flow_sdianc_data.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/flow_video.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/flow_video_coded.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/flow_video_raw.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/node.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/nodeapi-base.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/nodeapi-receiver-target.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/nodes.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/queryapi-base.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/queryapi-subscription-response.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/queryapi-subscriptions-post-request.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/queryapi-subscriptions-response.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/queryapi-subscriptions-websocket.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/receiver.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/receivers.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/receiver_audio.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/receiver_core.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/receiver_data.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/receiver_mux.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/receiver_video.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/registrationapi-base.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/registrationapi-health-response.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/registrationapi-resource-post-request.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/registrationapi-resource-response.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/resource_core.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/sender.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/senders.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/source.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/sources.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/source_audio.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/source_core.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_1_TAG}/APIs/schemas/source_generic.json
)
set(NMOS_IS04_V1_0_SCHEMAS_JSON
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/device.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/devices.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/error.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/flow.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/flows.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/node.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/nodeapi-base.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/nodeapi-receiver-target.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/nodes.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/queryapi-base.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/queryapi-subscription-response.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/queryapi-subscriptions-response.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/queryapi-v1.0-subscriptions-post-request.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/queryapi-v1.0-subscriptions-websocket.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/receiver.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/receivers.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/registrationapi-base.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/registrationapi-health-response.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/registrationapi-resource-response.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/registrationapi-v1.0-resource-post-request.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/sender-target.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/sender.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/senders.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/source.json
third_party/nmos-discovery-registration/${NMOS_IS04_V1_0_TAG}/APIs/schemas/sources.json
)
set(NMOS_IS04_SCHEMAS_JSON_MATCH "third_party/nmos-discovery-registration/([^/]+)/APIs/schemas/([^;]+)\\.json")
set(NMOS_IS04_SCHEMAS_SOURCE_REPLACE "${CMAKE_CURRENT_BINARY_DIR_REPLACE}/nmos/is04_schemas/\\1/\\2.cpp")
string(REGEX REPLACE "${NMOS_IS04_SCHEMAS_JSON_MATCH}(;|$)" "${NMOS_IS04_SCHEMAS_SOURCE_REPLACE}\\3" NMOS_IS04_V1_3_SCHEMAS_SOURCES "${NMOS_IS04_V1_3_SCHEMAS_JSON}")
string(REGEX REPLACE "${NMOS_IS04_SCHEMAS_JSON_MATCH}(;|$)" "${NMOS_IS04_SCHEMAS_SOURCE_REPLACE}\\3" NMOS_IS04_V1_2_SCHEMAS_SOURCES "${NMOS_IS04_V1_2_SCHEMAS_JSON}")
string(REGEX REPLACE "${NMOS_IS04_SCHEMAS_JSON_MATCH}(;|$)" "${NMOS_IS04_SCHEMAS_SOURCE_REPLACE}\\3" NMOS_IS04_V1_1_SCHEMAS_SOURCES "${NMOS_IS04_V1_1_SCHEMAS_JSON}")
string(REGEX REPLACE "${NMOS_IS04_SCHEMAS_JSON_MATCH}(;|$)" "${NMOS_IS04_SCHEMAS_SOURCE_REPLACE}\\3" NMOS_IS04_V1_0_SCHEMAS_SOURCES "${NMOS_IS04_V1_0_SCHEMAS_JSON}")
foreach(JSON ${NMOS_IS04_V1_3_SCHEMAS_JSON} ${NMOS_IS04_V1_2_SCHEMAS_JSON} ${NMOS_IS04_V1_1_SCHEMAS_JSON} ${NMOS_IS04_V1_0_SCHEMAS_JSON})
string(REGEX REPLACE "${NMOS_IS04_SCHEMAS_JSON_MATCH}" "${NMOS_IS04_SCHEMAS_SOURCE_REPLACE}" SOURCE "${JSON}")
string(REGEX REPLACE "${NMOS_IS04_SCHEMAS_JSON_MATCH}" "\\1" NS "${JSON}")
string(REGEX REPLACE "${NMOS_IS04_SCHEMAS_JSON_MATCH}" "\\2" VAR "${JSON}")
string(MAKE_C_IDENTIFIER "${NS}" NS)
string(MAKE_C_IDENTIFIER "${VAR}" VAR)
file(WRITE "${SOURCE}.in" "\
// Auto-generated from: ${JSON}\n\
\n\
namespace nmos\n\
{\n\
namespace is04_schemas\n\
{\n\
namespace ${NS}\n\
{\n\
const char* ${VAR} = R\"-auto-generated-(")
file(READ "${JSON}" RAW)
file(APPEND "${SOURCE}.in" "${RAW}")
file(APPEND "${SOURCE}.in" ")-auto-generated-\";\n\
}\n\
}\n\
}\n")
configure_file("${SOURCE}.in" "${SOURCE}" COPYONLY)
endforeach()
add_library(
nmos_is04_schemas STATIC
${NMOS_IS04_SCHEMAS_HEADERS}
${NMOS_IS04_V1_3_SCHEMAS_SOURCES}
${NMOS_IS04_V1_2_SCHEMAS_SOURCES}
${NMOS_IS04_V1_1_SCHEMAS_SOURCES}
${NMOS_IS04_V1_0_SCHEMAS_SOURCES}
)
source_group("nmos\\is04_schemas\\Header Files" FILES ${NMOS_IS04_SCHEMAS_HEADERS})
source_group("nmos\\is04_schemas\\${NMOS_IS04_V1_3_TAG}\\Source Files" FILES ${NMOS_IS04_V1_3_SCHEMAS_SOURCES})
source_group("nmos\\is04_schemas\\${NMOS_IS04_V1_2_TAG}\\Source Files" FILES ${NMOS_IS04_V1_2_SCHEMAS_SOURCES})
source_group("nmos\\is04_schemas\\${NMOS_IS04_V1_1_TAG}\\Source Files" FILES ${NMOS_IS04_V1_1_SCHEMAS_SOURCES})
source_group("nmos\\is04_schemas\\${NMOS_IS04_V1_0_TAG}\\Source Files" FILES ${NMOS_IS04_V1_0_SCHEMAS_SOURCES})
target_link_libraries(
nmos_is04_schemas PRIVATE
nmos-cpp::compile-settings
)
target_include_directories(nmos_is04_schemas PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${NMOS_CPP_INSTALL_INCLUDEDIR}>
)
list(APPEND NMOS_CPP_TARGETS nmos_is04_schemas)
add_library(nmos-cpp::nmos_is04_schemas ALIAS nmos_is04_schemas)
# nmos_is05_schemas library
set(NMOS_IS05_SCHEMAS_HEADERS
nmos/is05_schemas/is05_schemas.h
)
set(NMOS_IS05_V1_1_TAG v1.1.x)
set(NMOS_IS05_V1_0_TAG v1.0.x)
set(NMOS_IS05_V1_1_SCHEMAS_JSON
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/activation-response-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/activation-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/bulk-receiver-post-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/bulk-response-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/bulk-sender-post-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/connectionapi-base.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/connectionapi-bulk.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/connectionapi-receiver.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/connectionapi-sender.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/connectionapi-single.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/constraint-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/constraints-schema-mqtt.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/constraints-schema-rtp.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/constraints-schema-websocket.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/constraints-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/error.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/receiver_transport_params.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/receiver_transport_params_dash.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/receiver_transport_params_ext.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/receiver_transport_params_mqtt.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/receiver_transport_params_rtp.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/receiver_transport_params_websocket.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/receiver-response-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/receiver-stage-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/receiver-transport-file.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/sender_transport_params.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/sender_transport_params_dash.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/sender_transport_params_ext.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/sender_transport_params_mqtt.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/sender_transport_params_rtp.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/sender_transport_params_websocket.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/sender-receiver-base.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/sender-response-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/sender-stage-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_1_TAG}/APIs/schemas/transporttype-response-schema.json
)
set(NMOS_IS05_V1_0_SCHEMAS_JSON
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/connectionapi-base.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/connectionapi-bulk.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/connectionapi-receiver.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/connectionapi-sender.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/connectionapi-single.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/error.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/v1.0_receiver_transport_params_dash.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/v1.0_receiver_transport_params_rtp.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/v1.0_sender_transport_params_dash.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/v1.0_sender_transport_params_rtp.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/v1.0-activation-response-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/v1.0-activation-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/v1.0-bulk-receiver-post-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/v1.0-bulk-response-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/v1.0-bulk-sender-post-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/v1.0-constraints-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/v1.0-receiver-response-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/v1.0-receiver-stage-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/sender-receiver-base.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/v1.0-sender-response-schema.json
third_party/nmos-device-connection-management/${NMOS_IS05_V1_0_TAG}/APIs/schemas/v1.0-sender-stage-schema.json
)
set(NMOS_IS05_SCHEMAS_JSON_MATCH "third_party/nmos-device-connection-management/([^/]+)/APIs/schemas/([^;]+)\\.json")
set(NMOS_IS05_SCHEMAS_SOURCE_REPLACE "${CMAKE_CURRENT_BINARY_DIR_REPLACE}/nmos/is05_schemas/\\1/\\2.cpp")
string(REGEX REPLACE "${NMOS_IS05_SCHEMAS_JSON_MATCH}(;|$)" "${NMOS_IS05_SCHEMAS_SOURCE_REPLACE}\\3" NMOS_IS05_V1_1_SCHEMAS_SOURCES "${NMOS_IS05_V1_1_SCHEMAS_JSON}")
string(REGEX REPLACE "${NMOS_IS05_SCHEMAS_JSON_MATCH}(;|$)" "${NMOS_IS05_SCHEMAS_SOURCE_REPLACE}\\3" NMOS_IS05_V1_0_SCHEMAS_SOURCES "${NMOS_IS05_V1_0_SCHEMAS_JSON}")
foreach(JSON ${NMOS_IS05_V1_1_SCHEMAS_JSON} ${NMOS_IS05_V1_0_SCHEMAS_JSON})
string(REGEX REPLACE "${NMOS_IS05_SCHEMAS_JSON_MATCH}" "${NMOS_IS05_SCHEMAS_SOURCE_REPLACE}" SOURCE "${JSON}")
string(REGEX REPLACE "${NMOS_IS05_SCHEMAS_JSON_MATCH}" "\\1" NS "${JSON}")
string(REGEX REPLACE "${NMOS_IS05_SCHEMAS_JSON_MATCH}" "\\2" VAR "${JSON}")
string(MAKE_C_IDENTIFIER "${NS}" NS)
string(MAKE_C_IDENTIFIER "${VAR}" VAR)
file(WRITE "${SOURCE}.in" "\
// Auto-generated from: ${JSON}\n\
\n\
namespace nmos\n\
{\n\
namespace is05_schemas\n\
{\n\
namespace ${NS}\n\
{\n\
const char* ${VAR} = R\"-auto-generated-(")
file(READ "${JSON}" RAW)
file(APPEND "${SOURCE}.in" "${RAW}")
file(APPEND "${SOURCE}.in" ")-auto-generated-\";\n\
}\n\
}\n\
}\n")
configure_file("${SOURCE}.in" "${SOURCE}" COPYONLY)
endforeach()
add_library(
nmos_is05_schemas STATIC
${NMOS_IS05_SCHEMAS_HEADERS}
${NMOS_IS05_V1_1_SCHEMAS_SOURCES}
${NMOS_IS05_V1_0_SCHEMAS_SOURCES}
)
source_group("nmos\\is05_schemas\\Header Files" FILES ${NMOS_IS05_SCHEMAS_HEADERS})
source_group("nmos\\is05_schemas\\${NMOS_IS05_V1_1_TAG}\\Source Files" FILES ${NMOS_IS05_V1_1_SCHEMAS_SOURCES})
source_group("nmos\\is05_schemas\\${NMOS_IS05_V1_0_TAG}\\Source Files" FILES ${NMOS_IS05_V1_0_SCHEMAS_SOURCES})
target_link_libraries(
nmos_is05_schemas PRIVATE
nmos-cpp::compile-settings
)
target_include_directories(nmos_is05_schemas PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${NMOS_CPP_INSTALL_INCLUDEDIR}>
)
list(APPEND NMOS_CPP_TARGETS nmos_is05_schemas)
add_library(nmos-cpp::nmos_is05_schemas ALIAS nmos_is05_schemas)
# nmos_is08_schemas library
set(NMOS_IS08_SCHEMAS_HEADERS
nmos/is08_schemas/is08_schemas.h
)
set(NMOS_IS08_V1_0_TAG v1.0.x)
set(NMOS_IS08_V1_0_SCHEMAS_JSON
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/activation-response-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/activation-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/base-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/error.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/input-base-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/input-caps-response-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/input-channels-response-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/input-parent-response-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/input-properties-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/inputs-outputs-base-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/io-response-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/map-activations-activation-get-response-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/map-activations-get-response-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/map-activations-post-request-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/map-activations-post-response-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/map-active-output-response-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/map-active-response-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/map-base-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/map-entries-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/output-base-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/output-caps-response-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/output-channels-response-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/output-properties-schema.json
third_party/nmos-audio-channel-mapping/${NMOS_IS08_V1_0_TAG}/APIs/schemas/output-sourceid-response-schema.json
)
set(NMOS_IS08_SCHEMAS_JSON_MATCH "third_party/nmos-audio-channel-mapping/([^/]+)/APIs/schemas/([^;]+)\\.json")
set(NMOS_IS08_SCHEMAS_SOURCE_REPLACE "${CMAKE_CURRENT_BINARY_DIR_REPLACE}/nmos/is08_schemas/\\1/\\2.cpp")
string(REGEX REPLACE "${NMOS_IS08_SCHEMAS_JSON_MATCH}(;|$)" "${NMOS_IS08_SCHEMAS_SOURCE_REPLACE}\\3" NMOS_IS08_V1_0_SCHEMAS_SOURCES "${NMOS_IS08_V1_0_SCHEMAS_JSON}")
foreach(JSON ${NMOS_IS08_V1_0_SCHEMAS_JSON})
string(REGEX REPLACE "${NMOS_IS08_SCHEMAS_JSON_MATCH}" "${NMOS_IS08_SCHEMAS_SOURCE_REPLACE}" SOURCE "${JSON}")
string(REGEX REPLACE "${NMOS_IS08_SCHEMAS_JSON_MATCH}" "\\1" NS "${JSON}")
string(REGEX REPLACE "${NMOS_IS08_SCHEMAS_JSON_MATCH}" "\\2" VAR "${JSON}")
string(MAKE_C_IDENTIFIER "${NS}" NS)
string(MAKE_C_IDENTIFIER "${VAR}" VAR)
file(WRITE "${SOURCE}.in" "\
// Auto-generated from: ${JSON}\n\
\n\
namespace nmos\n\
{\n\
namespace is08_schemas\n\
{\n\
namespace ${NS}\n\
{\n\
const char* ${VAR} = R\"-auto-generated-(")
file(READ "${JSON}" RAW)
file(APPEND "${SOURCE}.in" "${RAW}")
file(APPEND "${SOURCE}.in" ")-auto-generated-\";\n\
}\n\
}\n\
}\n")
configure_file("${SOURCE}.in" "${SOURCE}" COPYONLY)
endforeach()
add_library(
nmos_is08_schemas STATIC
${NMOS_IS08_SCHEMAS_HEADERS}
${NMOS_IS08_V1_0_SCHEMAS_SOURCES}
)
source_group("nmos\\is08_schemas\\Header Files" FILES ${NMOS_IS08_SCHEMAS_HEADERS})
source_group("nmos\\is08_schemas\\${NMOS_IS08_V1_0_TAG}\\Source Files" FILES ${NMOS_IS08_V1_0_SCHEMAS_SOURCES})
target_link_libraries(
nmos_is08_schemas PRIVATE
nmos-cpp::compile-settings
)
target_include_directories(nmos_is08_schemas PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${NMOS_CPP_INSTALL_INCLUDEDIR}>
)
list(APPEND NMOS_CPP_TARGETS nmos_is08_schemas)
add_library(nmos-cpp::nmos_is08_schemas ALIAS nmos_is08_schemas)
# nmos_is09_schemas library
set(NMOS_IS09_SCHEMAS_HEADERS
nmos/is09_schemas/is09_schemas.h
)
set(NMOS_IS09_V1_0_TAG v1.0.x)
set(NMOS_IS09_V1_0_SCHEMAS_JSON
third_party/nmos-system/${NMOS_IS09_V1_0_TAG}/APIs/schemas/base.json
third_party/nmos-system/${NMOS_IS09_V1_0_TAG}/APIs/schemas/error.json
third_party/nmos-system/${NMOS_IS09_V1_0_TAG}/APIs/schemas/global.json
third_party/nmos-system/${NMOS_IS09_V1_0_TAG}/APIs/schemas/resource_core.json
)
set(NMOS_IS09_SCHEMAS_JSON_MATCH "third_party/nmos-system/([^/]+)/APIs/schemas/([^;]+)\\.json")
set(NMOS_IS09_SCHEMAS_SOURCE_REPLACE "${CMAKE_CURRENT_BINARY_DIR_REPLACE}/nmos/is09_schemas/\\1/\\2.cpp")
string(REGEX REPLACE "${NMOS_IS09_SCHEMAS_JSON_MATCH}(;|$)" "${NMOS_IS09_SCHEMAS_SOURCE_REPLACE}\\3" NMOS_IS09_V1_0_SCHEMAS_SOURCES "${NMOS_IS09_V1_0_SCHEMAS_JSON}")
foreach(JSON ${NMOS_IS09_V1_0_SCHEMAS_JSON})
string(REGEX REPLACE "${NMOS_IS09_SCHEMAS_JSON_MATCH}" "${NMOS_IS09_SCHEMAS_SOURCE_REPLACE}" SOURCE "${JSON}")
string(REGEX REPLACE "${NMOS_IS09_SCHEMAS_JSON_MATCH}" "\\1" NS "${JSON}")
string(REGEX REPLACE "${NMOS_IS09_SCHEMAS_JSON_MATCH}" "\\2" VAR "${JSON}")
string(MAKE_C_IDENTIFIER "${NS}" NS)
string(MAKE_C_IDENTIFIER "${VAR}" VAR)
file(WRITE "${SOURCE}.in" "\
// Auto-generated from: ${JSON}\n\
\n\
namespace nmos\n\
{\n\
namespace is09_schemas\n\
{\n\
namespace ${NS}\n\
{\n\
const char* ${VAR} = R\"-auto-generated-(")
file(READ "${JSON}" RAW)
file(APPEND "${SOURCE}.in" "${RAW}")
file(APPEND "${SOURCE}.in" ")-auto-generated-\";\n\
}\n\
}\n\
}\n")
configure_file("${SOURCE}.in" "${SOURCE}" COPYONLY)
endforeach()
add_library(
nmos_is09_schemas STATIC
${NMOS_IS09_SCHEMAS_HEADERS}
${NMOS_IS09_V1_0_SCHEMAS_SOURCES}
)
source_group("nmos\\is09_schemas\\Header Files" FILES ${NMOS_IS09_SCHEMAS_HEADERS})
source_group("nmos\\is09_schemas\\${NMOS_IS09_V1_0_TAG}\\Source Files" FILES ${NMOS_IS09_V1_0_SCHEMAS_SOURCES})
target_link_libraries(
nmos_is09_schemas PRIVATE
nmos-cpp::compile-settings
)
target_include_directories(nmos_is09_schemas PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${NMOS_CPP_INSTALL_INCLUDEDIR}>
)
list(APPEND NMOS_CPP_TARGETS nmos_is09_schemas)
add_library(nmos-cpp::nmos_is09_schemas ALIAS nmos_is09_schemas)
# nmos-cpp library
set(NMOS_CPP_BST_SOURCES
)
set(NMOS_CPP_BST_HEADERS
bst/filesystem.h
bst/optional.h
bst/regex.h
bst/shared_mutex.h
)
set(NMOS_CPP_CPPREST_SOURCES
cpprest/api_router.cpp
cpprest/host_utils.cpp
cpprest/http_utils.cpp
cpprest/json_escape.cpp
cpprest/json_storage.cpp
cpprest/json_utils.cpp
cpprest/json_validator_impl.cpp
cpprest/json_visit.cpp
cpprest/ws_listener_impl.cpp
)
if(MSVC)
# workaround for "fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj"
set_source_files_properties(cpprest/ws_listener_impl.cpp PROPERTIES COMPILE_FLAGS /bigobj)
endif()
set(NMOS_CPP_CPPREST_HEADERS
cpprest/api_router.h
cpprest/basic_utils.h
cpprest/host_utils.h
cpprest/http_utils.h
cpprest/json_escape.h
cpprest/json_ops.h
cpprest/json_storage.h
cpprest/json_utils.h
cpprest/json_validator.h
cpprest/json_visit.h
cpprest/logging_utils.h
cpprest/regex_utils.h
cpprest/uri_schemes.h
cpprest/ws_listener.h
cpprest/ws_utils.h
)
set(NMOS_CPP_CPPREST_DETAILS_HEADERS
cpprest/details/boost_u_workaround.h
cpprest/details/pop_u.h
cpprest/details/push_undef_u.h
cpprest/details/system_error.h
)
set(NMOS_CPP_NMOS_SOURCES
nmos/activation_utils.cpp
nmos/admin_ui.cpp
nmos/api_downgrade.cpp
nmos/api_utils.cpp
nmos/capabilities.cpp
nmos/certificate_handlers.cpp
nmos/channelmapping_activation.cpp
nmos/channelmapping_api.cpp
nmos/channelmapping_resources.cpp
nmos/channels.cpp
nmos/client_utils.cpp
nmos/components.cpp
nmos/connection_activation.cpp
nmos/connection_api.cpp
nmos/connection_events_activation.cpp
nmos/connection_resources.cpp
nmos/did_sdid.cpp
nmos/events_api.cpp
nmos/events_resources.cpp
nmos/events_ws_api.cpp
nmos/events_ws_client.cpp
nmos/filesystem_route.cpp
nmos/group_hint.cpp
nmos/id.cpp
nmos/lldp_handler.cpp
nmos/lldp_manager.cpp
nmos/json_schema.cpp
nmos/log_model.cpp
nmos/logging_api.cpp
nmos/manifest_api.cpp
nmos/mdns.cpp
nmos/mdns_api.cpp
nmos/node_api.cpp
nmos/node_api_target_handler.cpp
nmos/node_behaviour.cpp
nmos/node_interfaces.cpp
nmos/node_resource.cpp
nmos/node_resources.cpp
nmos/node_server.cpp
nmos/node_system_behaviour.cpp
nmos/process_utils.cpp
nmos/query_api.cpp
nmos/query_utils.cpp
nmos/query_ws_api.cpp
nmos/rational.cpp
nmos/registration_api.cpp
nmos/registry_resources.cpp
nmos/registry_server.cpp
nmos/resource.cpp
nmos/resources.cpp
nmos/schemas_api.cpp
nmos/sdp_utils.cpp
nmos/server.cpp
nmos/server_utils.cpp
nmos/settings.cpp
nmos/settings_api.cpp
nmos/system_api.cpp
nmos/system_resources.cpp
)
set(NMOS_CPP_NMOS_HEADERS
nmos/activation_mode.h
nmos/activation_utils.h
nmos/admin_ui.h
nmos/api_downgrade.h
nmos/api_utils.h
nmos/api_version.h
nmos/capabilities.h
nmos/certificate_handlers.h
nmos/certificate_settings.h
nmos/channelmapping_activation.h
nmos/channelmapping_api.h
nmos/channelmapping_resources.h
nmos/channels.h
nmos/client_utils.h
nmos/clock_name.h
nmos/clock_ref_type.h
nmos/colorspace.h
nmos/components.h
nmos/copyable_atomic.h
nmos/connection_activation.h
nmos/connection_api.h
nmos/connection_events_activation.h
nmos/connection_resources.h
nmos/device_type.h
nmos/did_sdid.h
nmos/event_type.h
nmos/events_api.h
nmos/events_resources.h
nmos/events_ws_api.h
nmos/events_ws_client.h
nmos/filesystem_route.h
nmos/format.h
nmos/group_hint.h
nmos/health.h
nmos/id.h
nmos/interlace_mode.h
nmos/is04_versions.h
nmos/is05_versions.h
nmos/is07_versions.h
nmos/is08_versions.h
nmos/is09_versions.h
nmos/json_fields.h
nmos/json_schema.h
nmos/lldp_handler.h
nmos/lldp_manager.h
nmos/log_gate.h
nmos/log_manip.h
nmos/log_model.h
nmos/logging_api.h
nmos/manifest_api.h
nmos/mdns.h
nmos/mdns_api.h
nmos/mdns_versions.h
nmos/media_type.h
nmos/model.h
nmos/mutex.h
nmos/node_api.h
nmos/node_api_target_handler.h
nmos/node_behaviour.h
nmos/node_interfaces.h
nmos/node_resource.h
nmos/node_resources.h
nmos/node_server.h
nmos/node_system_behaviour.h
nmos/paging_utils.h
nmos/process_utils.h
nmos/query_api.h
nmos/query_utils.h
nmos/query_ws_api.h
nmos/random.h
nmos/rational.h
nmos/registration_api.h
nmos/registry_resources.h
nmos/registry_server.h
nmos/resource.h
nmos/resources.h
nmos/schemas_api.h
nmos/sdp_utils.h
nmos/server.h
nmos/server_utils.h
nmos/settings.h
nmos/settings_api.h
nmos/slog.h
nmos/ssl_context_options.h
nmos/string_enum.h
nmos/system_api.h
nmos/system_resources.h
nmos/tai.h
nmos/thread_utils.h
nmos/transfer_characteristic.h
nmos/transport.h
nmos/type.h
nmos/version.h
nmos/vpid_code.h
nmos/websockets.h
)
set(NMOS_CPP_PPLX_SOURCES
pplx/pplx_utils.cpp
)
set(NMOS_CPP_PPLX_HEADERS
pplx/pplx_utils.h
)
set(NMOS_CPP_RQL_SOURCES
rql/rql.cpp
)
set(NMOS_CPP_RQL_HEADERS
rql/rql.h
)
set(NMOS_CPP_SDP_SOURCES
sdp/sdp_grammar.cpp
)
set(NMOS_CPP_SDP_HEADERS
sdp/json.h
sdp/ntp.h
sdp/sdp.h
sdp/sdp_grammar.h
)
add_library(
nmos-cpp STATIC
${NMOS_CPP_BST_SOURCES}
${NMOS_CPP_BST_HEADERS}
${NMOS_CPP_CPPREST_SOURCES}
${NMOS_CPP_CPPREST_HEADERS}
${NMOS_CPP_NMOS_SOURCES}
${NMOS_CPP_NMOS_HEADERS}
${NMOS_CPP_PPLX_SOURCES}
${NMOS_CPP_PPLX_HEADERS}
${NMOS_CPP_RQL_SOURCES}
${NMOS_CPP_RQL_HEADERS}
${NMOS_CPP_SDP_SOURCES}
${NMOS_CPP_SDP_HEADERS}
)
source_group("bst\\Source Files" FILES ${NMOS_CPP_BST_SOURCES})
source_group("cpprest\\Source Files" FILES ${NMOS_CPP_CPPREST_SOURCES})
source_group("nmos\\Source Files" FILES ${NMOS_CPP_NMOS_SOURCES})
source_group("pplx\\Source Files" FILES ${NMOS_CPP_PPLX_SOURCES})
source_group("rql\\Source Files" FILES ${NMOS_CPP_RQL_SOURCES})
source_group("sdp\\Source Files" FILES ${NMOS_CPP_SDP_SOURCES})
source_group("bst\\Header Files" FILES ${NMOS_CPP_BST_HEADERS})
source_group("cpprest\\Header Files" FILES ${NMOS_CPP_CPPREST_HEADERS})
source_group("nmos\\Header Files" FILES ${NMOS_CPP_NMOS_HEADERS})
source_group("pplx\\Header Files" FILES ${NMOS_CPP_PPLX_HEADERS})
source_group("rql\\Header Files" FILES ${NMOS_CPP_RQL_HEADERS})
source_group("sdp\\Header Files" FILES ${NMOS_CPP_SDP_HEADERS})
target_link_libraries(
nmos-cpp PRIVATE
nmos-cpp::compile-settings
)
target_link_libraries(
nmos-cpp PUBLIC
nmos-cpp::nmos_is04_schemas
nmos-cpp::nmos_is05_schemas
nmos-cpp::nmos_is08_schemas
nmos-cpp::nmos_is09_schemas
nmos-cpp::mdns
nmos-cpp::slog
nmos-cpp::OpenSSL
nmos-cpp::cpprestsdk
nmos-cpp::Boost
)
target_link_libraries(
nmos-cpp PRIVATE
nmos-cpp::websocketpp
nmos-cpp::json_schema_validator
)
if(NMOS_CPP_BUILD_LLDP)
target_link_libraries(
nmos-cpp PUBLIC
nmos-cpp::lldp
)
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
# link to resolver functions (for cpprest/host_utils.cpp)
# note: this is no longer required on all platforms
target_link_libraries(
nmos-cpp PUBLIC
resolv
)
if(CMAKE_CXX_COMPILER_ID MATCHES GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 5.3)
# link to std::filesystem functions (for bst/filesystem.h, used by nmos/filesystem_route.cpp)
target_link_libraries(
nmos-cpp PUBLIC
stdc++fs
)
endif()
endif()
target_include_directories(nmos-cpp PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${NMOS_CPP_INSTALL_INCLUDEDIR}>
)