Skip to content

[shapelib] Fix shapelib usage#22633

Merged
BillyONeal merged 4 commits intomicrosoft:masterfrom
JonLiu1993:dev/Jon/shapelib
Mar 21, 2022
Merged

[shapelib] Fix shapelib usage#22633
BillyONeal merged 4 commits intomicrosoft:masterfrom
JonLiu1993:dev/Jon/shapelib

Conversation

@JonLiu1993
Copy link
Copy Markdown
Contributor

Describe the pull request

Shapelib unable to find shp-config.cmake when including in build

[cmake] CMake Error at external/vcpkg/scripts/buildsystems/vcpkg.cmake:650 (_find_package):
[cmake]   Could not find a package configuration file provided by "shp" with any of
[cmake]   the following names:
[cmake] 
[cmake]     shpConfig.cmake
[cmake]     shp-config.cmake
[cmake] 

Export the shpConfig file can solved the bug

I have test the usage successfully on my local machine:

PS F:\test9\test\build> F:\test9\vcpkg\downloads\tools\cmake-3.21.1-windows\cmake-3.21.1-windows-i386\bin\cmake.exe -G "Visual Studio 16 2019" -A Win32 -DCMAKE_TOOLCHAIN_FILE=F:/test9/vcpkg/scripts/buildsystems/vcpkg.cmake ..
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- Configuring done
-- Generating done
-- Build files have been written to: F:/test9/test/build
PS F:\test9\test\build> F:\test9\vcpkg\downloads\tools\cmake-3.21.1-windows\cmake-3.21.1-windows-i386\bin\cmake.exe --build .
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  main.cpp
  main.vcxproj -> F:\test9\test\build\Debug\main.exe
  Building Custom Rule F:/test9/test/CMakeLists.txt

@JonLiu1993 JonLiu1993 added category:port-bug The issue is with a library, which is something the port should already support info:internal labels Jan 19, 2022
@JonLiu1993 JonLiu1993 marked this pull request as ready for review January 20, 2022 01:14
@JonLiu1993 JonLiu1993 requested a review from JackBoosY January 27, 2022 10:11
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have modified or added at least one vcpkg.json where a "license" field is missing.
If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/shapelib/vcpkg.json

Valid values for the license field are listed at https://spdx.org/licenses/

@JonLiu1993 JonLiu1993 marked this pull request as draft February 16, 2022 08:44
@JonLiu1993 JonLiu1993 marked this pull request as ready for review February 24, 2022 08:13
-# for the export_shp name.
-install(EXPORT export_shp DESTINATION ${CMAKE_INSTALL_SHP_DATADIR})
+# for the shpConfig name.
+install(EXPORT shpConfig DESTINATION ${CMAKE_INSTALL_SHP_DATADIR})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also please report this to the upstream plase.

@JonLiu1993 JonLiu1993 added the info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. label Mar 18, 2022
@BillyONeal BillyONeal merged commit ce5fa83 into microsoft:master Mar 21, 2022
@BillyONeal
Copy link
Copy Markdown
Member

Thanks for the fix!

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.

[shapelib] Unable to find shp-config.cmake when including in build

3 participants