Skip to content

Commit d1055ba

Browse files
committed
Exclude those weird CV_EXPORTS functions that are missing in *.so from generation completely
Fixes #164
1 parent 379869b commit d1055ba

File tree

1 file changed

+31
-32
lines changed

1 file changed

+31
-32
lines changed

binding-generator/src/settings.rs

+31-32
Original file line numberDiff line numberDiff line change
@@ -499,45 +499,44 @@ pub static FUNC_RENAME: Lazy<HashMap<&str, &str>> = Lazy::new(|| hashmap! {
499499

500500
// ### videostab ###
501501
"cv_videostab_KeypointBasedMotionEstimator_estimate_const_MatR_const_MatR_boolX" => "+_mat",
502-
});
503502

504-
pub static FUNC_CFG_ATTR: Lazy<HashMap<&str, (&str, &str)>> = Lazy::new(|| hashmap! {
503+
// those function are marked as CV_EXPORTS, but they are missing from the shared libraries
505504
// ### core ###
506-
"cv_MatConstIterator_MatConstIterator_const_MatX_const_intX" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"), // missing in windows dll
507-
"cv_SparseMatIterator_SparseMatIterator_SparseMatX_const_intX" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"), // missing in windows dll
508-
"cv__OutputArray__OutputArray_const_vector_GpuMat_R" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"), // missing in windows dll
509-
"cv_cuda_convertFp16_const__InputArrayR_const__OutputArrayR_StreamR" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"), // missing in windows dll
510-
"cv_getImpl_vector_int_R_vector_String_R" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"), // missing in windows dll
511-
505+
"cv_MatConstIterator_MatConstIterator_const_MatX_const_intX" => "-",
506+
"cv_SparseMatIterator_SparseMatIterator_SparseMatX_const_intX" => "-",
507+
"cv__OutputArray__OutputArray_const_vector_GpuMat_R" => "-",
508+
"cv_cuda_convertFp16_const__InputArrayR_const__OutputArrayR_StreamR" => "-",
509+
"cv_getImpl_vector_int_R_vector_String_R" => "-",
512510
// ### dnn ###
513-
"cv_dnn_BackendNode_BackendNode_int" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"), // missing in windows dll
514-
515-
// ### imgproc ###
516-
"cv_getRotationMatrix2D__Point2f_double_double" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"), // missing in windows dll
517-
511+
"cv_dnn_BackendNode_BackendNode_int" => "-",
518512
// ### stitching ###
519-
"cv_createStitcherScans_bool" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"), // missing in windows dll
520-
"cv_createStitcher_bool" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"), // missing in windows dll
521-
513+
"cv_createStitcherScans_bool" => "-",
514+
"cv_createStitcher_bool" => "-",
522515
// ### surface_matching ###
523-
"cv_ppf_match_3d_PPF3DDetector_read_const_FileNodeR" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"), // missing in windows dll
524-
"cv_ppf_match_3d_PPF3DDetector_write_const_FileStorageR" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"), // missing in windows dll
516+
"cv_ppf_match_3d_PPF3DDetector_read_const_FileNodeR" => "-",
517+
"cv_ppf_match_3d_PPF3DDetector_write_const_FileStorageR" => "-",
518+
// ### tracking ###
519+
"cv_CvFeatureParams_CvFeatureParams" => "-",
520+
"cv_CvFeatureParams_create_FeatureType" => "-",
521+
"cv_CvFeatureParams_create_int" => "-",
522+
"cv_CvHaarEvaluator_FeatureHaar_FeatureHaar_Size" => "-",
523+
"cv_CvHaarEvaluator_FeatureHaar_eval_const_const_MatR_Rect_floatX" => "-",
524+
"cv_CvHaarEvaluator_FeatureHaar_getAreas_const" => "-",
525+
"cv_CvHaarEvaluator_FeatureHaar_getInitMean_const" => "-",
526+
"cv_CvHaarEvaluator_FeatureHaar_getInitSigma_const" => "-",
527+
"cv_CvHaarEvaluator_FeatureHaar_getNumAreas" => "-",
528+
"cv_CvHaarEvaluator_FeatureHaar_getWeights_const" => "-",
529+
"cv_CvHaarEvaluator_getFeatures_const" => "-",
530+
"cv_CvHaarEvaluator_setWinSize_Size" => "-",
531+
"cv_CvHaarEvaluator_setWinSize_const" => "-",
532+
"cv_CvHaarEvaluator_writeFeature_const_FileStorageR" => "-",
533+
});
534+
535+
pub static FUNC_CFG_ATTR: Lazy<HashMap<&str, (&str, &str)>> = Lazy::new(|| hashmap! {
536+
// ### imgproc ###
537+
"cv_getRotationMatrix2D__Point2f_double_double" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),
525538

526539
// ### tracking ###
527-
"cv_CvFeatureParams_CvFeatureParams" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),
528-
"cv_CvFeatureParams_create_FeatureType" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),
529-
"cv_CvFeatureParams_create_int" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),
530-
"cv_CvHaarEvaluator_FeatureHaar_FeatureHaar_Size" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),
531-
"cv_CvHaarEvaluator_FeatureHaar_eval_const_const_MatR_Rect_floatX" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),
532-
"cv_CvHaarEvaluator_FeatureHaar_getAreas_const" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),
533-
"cv_CvHaarEvaluator_FeatureHaar_getInitMean_const" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),
534-
"cv_CvHaarEvaluator_FeatureHaar_getInitSigma_const" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),
535-
"cv_CvHaarEvaluator_FeatureHaar_getNumAreas" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),
536-
"cv_CvHaarEvaluator_FeatureHaar_getWeights_const" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),
537-
"cv_CvHaarEvaluator_getFeatures_const" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),
538-
"cv_CvHaarEvaluator_setWinSize_Size" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),
539-
"cv_CvHaarEvaluator_setWinSize_const" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),
540-
"cv_CvHaarEvaluator_writeFeature_const_FileStorageR" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),
541540
"cv_TrackerStateEstimatorAdaBoosting_TrackerAdaBoostingTargetState_TrackerAdaBoostingTargetState_const_Point2fR_int_int_bool_const_MatR" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),
542541
"cv_TrackerStateEstimatorAdaBoosting_TrackerAdaBoostingTargetState_getTargetResponses_const" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),
543542
"cv_TrackerStateEstimatorAdaBoosting_TrackerAdaBoostingTargetState_isTargetFg_const" => ("not(target_os = \"windows\")", "!defined(OCVRS_TARGET_OS_WINDOWS)"),

0 commit comments

Comments
 (0)