{"id":22370060,"url":"https://github.com/andreicherniaev/cpp_libavcodec_universe","last_synced_at":"2025-03-26T16:24:48.361Z","repository":{"id":192984220,"uuid":"687865252","full_name":"AndreiCherniaev/Cpp_libavcodec_Universe","owner":"AndreiCherniaev","description":"This is C++ project with libavcodec","archived":false,"fork":false,"pushed_at":"2023-09-06T13:19:40.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T19:42:47.000Z","etag":null,"topics":["cmake","libavcodec"],"latest_commit_sha":null,"homepage":"https://stackoverflow.com/questions/77049844/pkg-config-path-a-required-package-was-not-found","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndreiCherniaev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-06T07:04:13.000Z","updated_at":"2023-09-06T13:13:33.000Z","dependencies_parsed_at":"2025-01-31T19:42:49.230Z","dependency_job_id":"a4edf4db-dd6b-479e-b915-85eb5c1384ef","html_url":"https://github.com/AndreiCherniaev/Cpp_libavcodec_Universe","commit_stats":null,"previous_names":["andreicherniaev/qt_ffmpeg_universe","andreicherniaev/cpp_libavcodec_universe"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiCherniaev%2FCpp_libavcodec_Universe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiCherniaev%2FCpp_libavcodec_Universe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiCherniaev%2FCpp_libavcodec_Universe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiCherniaev%2FCpp_libavcodec_Universe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndreiCherniaev","download_url":"https://codeload.github.com/AndreiCherniaev/Cpp_libavcodec_Universe/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245690546,"owners_count":20656603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","libavcodec"],"created_at":"2024-12-04T19:32:22.993Z","updated_at":"2025-03-26T16:24:48.344Z","avatar_url":"https://github.com/AndreiCherniaev.png","language":"Shell","readme":"This is C++ project that using libavcodec (FFMpeg), build system is cmake. \n## How build\nTested on Ubuntu 22 x86_64.\nPrepare and [build](https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu#FFmpeg) FFMpeg\n```bash\ngit clone https://github.com/AndreiCherniaev/Cpp_libavcodec_Universe.git \u0026\u0026 MyBaseDir=${PWD}/Cpp_libavcodec_Universe \u0026\u0026 cd Cpp_libavcodec_Universe\nchmod +x FFMpeg_themself/build_FFMpeg.sh\nFFMpeg_themself/build_FFMpeg.sh\n```\nBuild steps:\n```bash\necho ${MyBaseDir} #check path\ncd ${MyBaseDir}\ncmake -S myExample/src/ -B myExample/build-host/ --fresh\n```\n\n## Result\nProblem I describe below is already fixed by commit fbc9dcb89ae5554f9852a54628b313f6998621e9  \nFile myExample/src/CMakeLists.txt contains\n```cmake\ncmake_path(SET pkgconfig_path \"${CMAKE_CURRENT_LIST_DIR}/../../FFMpeg_themself/ffmpeg_build/lib/pkgconfig/\" NORMALIZE)\n```\nIf you use \"With Environment Variables\" case\n```cmake\n#set(CMAKE_PREFIX_PATH ${pkgconfig_path}) #makes \"A required package was not found\"\nset(ENV{PKG_CONFIG_PATH} ${pkgconfig_path}) #ok\n```\nthen you should get ok result like this\n```bash\n~/Cpp_libavcodec_Universe$ cmake -S myExample/src/ -B myExample/build-host/ --fresh\n-- The CXX compiler identification is GNU 11.4.0\n-- The C compiler identification is GNU 11.4.0\n-- Detecting CXX compiler ABI info\n-- Detecting CXX compiler ABI info - done\n-- Check for working CXX compiler: /usr/bin/c++ - skipped\n-- Detecting CXX compile features\n-- Detecting CXX compile features - done\n-- Detecting C compiler ABI info\n-- Detecting C compiler ABI info - done\n-- Check for working C compiler: /usr/bin/cc - skipped\n-- Detecting C compile features\n-- Detecting C compile features - done\nI found /home/user/Cpp_libavcodec_Universe/FFMpeg_themself/ffmpeg_build/lib/pkgconfig/\n-- Found PkgConfig: /usr/bin/pkg-config (found version \"0.29.2\") \n-- Checking for module 'libavcodec'\n--   Found libavcodec, version 60.25.100\n-- Configuring done (0.2s)\n-- Generating done (0.0s)\n-- Build files have been written to: /home/user/Cpp_libavcodec_Universe/myExample/build-host\n```\nBut if you use \"Without Environment Variables\" case\n```cmake\nset(CMAKE_PREFIX_PATH ${pkgconfig_path}) #makes \"A required package was not found\"\n#set(ENV{PKG_CONFIG_PATH} ${pkgconfig_path}) #ok\n```\nthen you should get bad result like this\n```bash\nI found \n-- Found PkgConfig: /usr/bin/pkg-config (found version \"0.29.2\") \n-- Checking for module 'libavcodec'\n--   No package 'libavcodec' found\nCMake Error at /home/user/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.26/Modules/FindPkgConfig.cmake:607 (message):\n  A required package was not found\nCall Stack (most recent call first):\n  /home/user/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.26/Modules/FindPkgConfig.cmake:829 (_pkg_check_modules_internal)\n  CMakeLists.txt:19 (pkg_check_modules)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreicherniaev%2Fcpp_libavcodec_universe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreicherniaev%2Fcpp_libavcodec_universe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreicherniaev%2Fcpp_libavcodec_universe/lists"}