Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libadlmidi] Fix CMake config for Linux/MacOS #30359

Merged
merged 1 commit into from
Mar 25, 2023

Conversation

dbarkar
Copy link
Contributor

@dbarkar dbarkar commented Mar 22, 2023

This change is coming from upstream: Wohlstand/libADLMIDI@4dcc626
It fixes finding the package on case-sensitive filesystems.

  • Changes comply with the maintainer guide
  • SHA512s are updated for each updated download
  • The "supports" clause reflects platforms that may be fixed by this new version
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

@dg0yt
Copy link
Contributor

dg0yt commented Mar 22, 2023

@dbarkar
Copy link
Contributor Author

dbarkar commented Mar 22, 2023

Wohlstand/libADLMIDI#263 (comment)

The project generates libADLMIDI-config.cmake while CMake is looking for libADLMIDIConfig.cmake or libadlmidi-config.cmake.
This is working for case insensitive filesystems only.

@JonLiu1993 JonLiu1993 self-assigned this Mar 23, 2023
@JonLiu1993 JonLiu1993 added the category:port-bug The issue is with a library, which is something the port should already support label Mar 23, 2023
@JonLiu1993
Copy link
Member

@dbarkar, Thanks for your PR, when I tested the usage by libadlmidi:x64-windows I got this error:

   CMake Error at F:/test/vcpkg/scripts/buildsystems/vcpkg.cmake:852 (_find_package):
   Could not find a package configuration file provided by "libADLMIDI" with
   any of the following names:
 
   libADLMIDIConfig.cmake
   libadlmidi-config.cmake
 
   Add the installation prefix of "libADLMIDI" to CMAKE_PREFIX_PATH or set
   "libADLMIDI_DIR" to a directory containing one of the above files.  If
   "libADLMIDI" provides a separate development package or SDK, be sure it has
   been installed.`
````

@dbarkar
Copy link
Contributor Author

dbarkar commented Mar 24, 2023

@JonLiu1993 can you please check it again with fresh build folder? Is there share/libadlmidi/libADLMIDIConfig.cmake? Can you share you CMakeLists.txt?

I just checked on Windows and Linux and it worked well.
Here is my working CMakeLists.txt:

cmake_minimum_required(VERSION 3.0)
project(test)

find_package(libADLMIDI CONFIG REQUIRED)

add_executable(main main.cpp)

target_link_libraries(main PRIVATE libADLMIDI::ADLMIDI)

@JonLiu1993
Copy link
Member

@dbarkar, I cleared my cache and tried again and it worked, sorry for the inconvenience:

  Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
  Copyright (C) Microsoft Corporation. All rights reserved.
  
    Checking Build System
    Building Custom Rule C:/Users/test/source/repos/CMakeProject42/CMakeProject42/CMakeLists.txt
    CMakeProject42.cpp
    main.vcxproj -> C:\Users\test\source\repos\CMakeProject42\out\build\x64-Debug\CMakeProject42\Debug\main.exe
    Building Custom Rule C:/Users/test/source/repos/CMakeProject42/CMakeLists.txt

Build All succeeded.

@JonLiu1993 JonLiu1993 added the info:reviewed Pull Request changes follow basic guidelines label Mar 24, 2023
@vicroms vicroms merged commit 2e1322f into microsoft:master Mar 25, 2023
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:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants