conda-forge / conda-forge/opencv-feedstock

Generating pkgconfig files for windows

Open
#325 1 comment 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Shell
Stars
70
Forks
70
PR merge metrics
No merged PRs in 30d

Description

### Comment:

Upstream developers are not thrilled about supporting pkgconfig files on windows.

Admittedly, they have caused us quite some frustration at conda-forge for various packages

When trying to install it with this simple patch:

simple patch

```patch
diff --git a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake
index 43d6a87e74..9e9d379544 100644
--- a/cmake/OpenCVGenPkgconfig.cmake
+++ b/cmake/OpenCVGenPkgconfig.cmake
@@ -1,4 +1,4 @@
-if(MSVC OR IOS)
+if(IOS)
return()
endif()

@@ -103,7 +103,7 @@ add_custom_target(gen-pkgconfig ALL SOURCES "${CMAKE_BINARY_DIR}/unix-install/${
add_dependencies(developer_scripts gen-pkgconfig)


-if(UNIX AND NOT ANDROID)
+if(NOT ANDROID)
install(FILES ${CMAKE_BINARY_DIR}/unix-install/${OPENCV_PC_FILE_NAME} DESTINATION ${OPENCV_LIB_INSTALL_PATH}/pkgconfig COMPONENT dev)
endif()
```

We found that it listed the shared library in the linking command instead of the `lib`.

if somebody wants to install pkgconfig files, they may find the above patch useful as a starting point.

Upstream suggested we adopt Cmake for finding FFMPEG on windows. I think they would likely suggest a similar approach to finding opencv on windows.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.