Skip to content

[iir1] Fix find_package failed#24015

Merged
strega-nil-ms merged 2 commits intomicrosoft:masterfrom
JonLiu1993:dev/Jon/23940
Apr 7, 2022
Merged

[iir1] Fix find_package failed#24015
strega-nil-ms merged 2 commits intomicrosoft:masterfrom
JonLiu1993:dev/Jon/23940

Conversation

@JonLiu1993
Copy link
Copy Markdown
Contributor

@JonLiu1993 JonLiu1993 commented Apr 7, 2022

Describe the pull request

The port's name is "iir1" while using find_package(iir):

    find_package(iir CONFIG REQUIRED)
    target_link_libraries(main PRIVATE iir::iir iir::iir_static)

so the search path of iir-config.cmakewill be installed/x64-windows/share/iir

however, vcpkg only creates dir installed/x64-windows/share/iir1/iir, thus find_package(iir) failed

Solution:
I change vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake) to vcpkg_cmake_config_fixup(PACKAGE_NAME iir CONFIG_PATH lib/cmake/iir) Fix this error,

I tested the usage locally:

1> CMake generation started for configuration: 'x64-Debug'.
1> Command line: "C:\WINDOWS\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"  -G "Visual Studio 16 2019" -A x64  -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\test\source\repos\iir1-test\out\install\x64-Debug" -DCMAKE_TOOLCHAIN_FILE=F:/Feature-test/iir1/vcpkg/scripts/buildsystems/vcpkg.cmake "C:\Users\test\source\repos\iir1-test" 2>&1"
1> Working directory: C:\Users\test\source\repos\iir1-test\out\build\x64-Debug
1> [CMake] -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
1> [CMake] -- Configuring done
1> [CMake] -- Generating done
1> [CMake] -- Build files have been written to: C:/Users/test/source/repos/iir1-test/out/build/x64-Debug
1> Extracted CMake variables.
1> Extracted source files and headers.
1> Extracted code model.
1> Extracted toolchain configurations.
1> Extracted includes paths.
1> CMake generation finished.
Rebuild started...
1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: Debug x64 ------
1>Checking Build System
2>------ Rebuild All started: Project: iir1-test, Configuration: Debug x64 ------
2>Building Custom Rule C:/Users/test/source/repos/iir1-test/iir1-test/CMakeLists.txt
2>iir1-test.cpp
2>iir1-test.vcxproj -> C:\Users\test\source\repos\iir1-test\out\build\x64-Debug\iir1-test\Debug\iir1-test.exe
3>------ Rebuild All started: Project: ALL_BUILD, Configuration: Debug x64 ------
3>Building Custom Rule C:/Users/test/source/repos/iir1-test/CMakeLists.txt
========== Rebuild All: 3 succeeded, 0 failed, 0 skipped ==========

@JonLiu1993 JonLiu1993 added category:port-bug The issue is with a library, which is something the port should already support info:internal labels Apr 7, 2022
@JonLiu1993 JonLiu1993 marked this pull request as ready for review April 7, 2022 08:55
@JonLiu1993 JonLiu1993 requested a review from Adela0814 April 7, 2022 08:55
@Adela0814 Adela0814 added the info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. label Apr 7, 2022
@strega-nil-ms
Copy link
Copy Markdown
Contributor

Thanks!

@strega-nil-ms strega-nil-ms merged commit 8eacf97 into microsoft:master Apr 7, 2022
@JonLiu1993 JonLiu1993 deleted the dev/Jon/23940 branch April 8, 2022 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:port-bug The issue is with a library, which is something the port should already support info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iir1] find_package failed

3 participants