1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00

build: made environment access a separate feature

This commit is contained in:
Maksim Shabunin
2024-10-17 23:35:38 +03:00
parent 2756c20e3e
commit 04818d6dd5
44 changed files with 176 additions and 275 deletions
+1
View File
@@ -54,6 +54,7 @@
#include "opencv2/core/utility.hpp"
#if defined(__OPENCV_BUILD)
#include "opencv2/core/private.hpp"
#include "opencv2/core/utils/configuration.private.hpp"
#endif
#include "opencv2/imgproc.hpp"
+1 -1
View File
@@ -133,7 +133,7 @@ protected:
bool readPrioritySettings()
{
bool hasChanges = false;
cv::String prioritized_backends = utils::getConfigurationParameterString("OPENCV_UI_PRIORITY_LIST", NULL);
cv::String prioritized_backends = utils::getConfigurationParameterString("OPENCV_UI_PRIORITY_LIST");
if (prioritized_backends.empty())
return hasChanges;
CV_LOG_INFO(NULL, "UI: Configured priority list (OPENCV_UI_PRIORITY_LIST): " << prioritized_backends);
+1 -1
View File
@@ -662,7 +662,7 @@ int cv::waitKey(int delay)
static int use_legacy = -1;
if (use_legacy < 0)
{
use_legacy = getenv("OPENCV_LEGACY_WAITKEY") != NULL ? 1 : 0;
use_legacy = utils::getConfigurationParameterBool("OPENCV_LEGACY_WAITKEY");
}
if (use_legacy > 0)
return code;
+1 -1
View File
@@ -1378,7 +1378,7 @@ int cv_wl_buffer::create_tmpfile(std::string const &tmpname) {
}
int cv_wl_buffer::create_anonymous_file(off_t size) {
auto path = getenv("XDG_RUNTIME_DIR") + std::string("/opencv-shared-XXXXXX");
auto path = cv::utils::getConfigurationParameterString("XDG_RUNTIME_DIR") + std::string("/opencv-shared-XXXXXX");
int fd = create_tmpfile(path);
int ret = posix_fallocate(fd, 0, size);