File tree 6 files changed +48
-0
lines changed
6 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,19 @@ add_subdirectory(vrs)
70
70
71
71
OPTION (BUILD_TOOLS "Build all of the tools" ON )
72
72
OPTION (BUILD_SAMPLES "Build sample code and sample apps" ON )
73
+ OPTION (BUILD_WITH_XPRS "Build with XPRS decoding library" OFF )
74
+
75
+ # Check the operating system for BUILD_WITH_XPRS
76
+ if (BUILD_WITH_XPRS)
77
+ if (NOT TARGET_LINUX)
78
+ message (FATAL_ERROR "BUILD_WITH_XPRS is only supported on Linux." )
79
+ endif ()
80
+ endif ()
81
+
82
+ # Add xprs folder if BUILD_WITH_XPRS is set
83
+ if (BUILD_WITH_XPRS)
84
+ add_subdirectory (${VRS_SOURCE_DIR} /xprs)
85
+ endif ()
73
86
74
87
if (BUILD_TOOLS)
75
88
# Add the vrs command line utility
Original file line number Diff line number Diff line change @@ -29,6 +29,12 @@ target_link_libraries(vrs
29
29
vrs_logging
30
30
)
31
31
32
+ # Conditionally link to vrs_utils_xprs if INCLUDE_XPRS is set
33
+ if (BUILD_WITH_XPRS)
34
+ target_link_libraries (vrs PRIVATE vrs_utils_xprs)
35
+ endif ()
36
+
37
+
32
38
install (TARGETS vrs EXPORT VRSLibTargets
33
39
RUNTIME DESTINATION bin
34
40
)
Original file line number Diff line number Diff line change 16
16
17
17
#include " VrsCommand.h"
18
18
19
+ #ifdef INCLUDE_XPRS
20
+ #include < vrs/utils/DecoderFactory.h>
21
+ #include < vrs/utils/xprs/XprsDecoder.h>
22
+ #endif
23
+
19
24
#include < vrs/os/Utils.h>
20
25
21
26
using namespace std ;
22
27
using namespace vrscli ;
23
28
24
29
int main (int argc, char ** argv) {
30
+ // Initialize with XPRS if included
31
+ #ifdef INCLUDE_XPRS
32
+ vrs::utils::DecoderFactory::get ().registerDecoderMaker (vrs::vxprs::xprsDecoderMaker);
33
+ #endif
34
+
25
35
const string& appName = vrs::os::getFilename (argv[0 ]);
26
36
if (argc == 1 ) {
27
37
printHelp (appName);
Original file line number Diff line number Diff line change @@ -42,6 +42,11 @@ if (QT_FOUND)
42
42
Threads::Threads
43
43
)
44
44
45
+ # Conditionally link to vrs_utils_xprs if INCLUDE_XPRS is set
46
+ if (BUILD_WITH_XPRS)
47
+ target_link_libraries (vrsplayer PRIVATE vrs_utils_xprs)
48
+ endif ()
49
+
45
50
install (TARGETS vrsplayer EXPORT VRSLibTargets
46
51
RUNTIME DESTINATION bin
47
52
)
Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
35
35
36
36
#include " PlayerWindow.h"
37
37
38
+ #ifdef INCLUDE_XPRS
39
+ #include < vrs/utils/DecoderFactory.h>
40
+ #include < vrs/utils/xprs/XprsDecoder.h>
41
+ #endif
42
+
38
43
using namespace std ;
39
44
40
45
namespace {
@@ -90,5 +95,9 @@ int main(int argc, char* argv[]) {
90
95
91
96
vrsp::PlayerWindow playerWindow (app);
92
97
98
+ #ifdef INCLUDE_XPRS
99
+ vrs::utils::DecoderFactory::get ().registerDecoderMaker (vrs::vxprs::xprsDecoderMaker);
100
+ #endif
101
+
93
102
return app.run (playerWindow.getPlayerUI (), parser);
94
103
}
Original file line number Diff line number Diff line change @@ -43,6 +43,11 @@ if (BUILD_WITH_OPUS)
43
43
target_compile_definitions (vrs_utils PRIVATE OPUS_IS_AVAILABLE)
44
44
endif ()
45
45
46
+ if (BUILD_WITH_XPRS)
47
+ add_subdirectory (xprs)
48
+ target_compile_definitions (vrs_utils PUBLIC INCLUDE_XPRS)
49
+ endif ()
50
+
46
51
target_include_directories (vrs_utils
47
52
INTERFACE
48
53
$<BUILD_INTERFACE:${VRS_SOURCE_DIR} >
You can’t perform that action at this time.
0 commit comments