Fix default int value in build.info
This commit is contained in:
parent
87458482d9
commit
22ea971407
|
@ -245,6 +245,25 @@ install(EXPORT ${MYNTEYE_NAME}-targets
|
|||
|
||||
find_package(CUDA QUIET)
|
||||
|
||||
macro(set_default_value VARIABLE DEFAULT)
|
||||
if(NOT ${VARIABLE})
|
||||
set(${VARIABLE} ${DEFAULT})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
set_default_value(GCC_VERSION_MAJOR 0)
|
||||
set_default_value(GCC_VERSION_MINOR 0)
|
||||
set_default_value(CUDA_VERSION_MAJOR 0)
|
||||
set_default_value(CUDA_VERSION_MINOR 0)
|
||||
set_default_value(OpenCV_VERSION_MAJOR 0)
|
||||
set_default_value(OpenCV_VERSION_MINOR 0)
|
||||
set_default_value(OpenCV_VERSION_PATCH 0)
|
||||
set_default_value(OpenCV_VERSION_TWEAK 0)
|
||||
set_default_value(${PROJECT_NAME}_VERSION_MAJOR 0)
|
||||
set_default_value(${PROJECT_NAME}_VERSION_MINOR 0)
|
||||
set_default_value(${PROJECT_NAME}_VERSION_PATCH 0)
|
||||
set_default_value(${PROJECT_NAME}_VERSION_TWEAK 0)
|
||||
|
||||
configure_file(
|
||||
cmake/templates/build.info.in
|
||||
build.info @ONLY
|
||||
|
|
|
@ -301,10 +301,14 @@ void API::Start(const Source &source) {
|
|||
if (source == Source::VIDEO_STREAMING) {
|
||||
#ifdef WITH_FILESYSTEM
|
||||
if (!synthetic_->HasPlugin()) {
|
||||
try {
|
||||
auto &&plugin_paths = get_plugin_paths();
|
||||
if (plugin_paths.size() > 0) {
|
||||
EnablePlugin(plugin_paths[0]);
|
||||
}
|
||||
} catch (...) {
|
||||
LOG(WARNING) << "Incorrect yaml format: build.info";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
synthetic_->StartVideoStreaming();
|
||||
|
|
Loading…
Reference in New Issue
Block a user