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

[sdflib] new port #43138

Merged
merged 1 commit into from
Jan 11, 2025
Merged

[sdflib] new port #43138

merged 1 commit into from
Jan 11, 2025

Conversation

talregev
Copy link
Contributor

@talregev talregev commented Jan 6, 2025

  • Changes comply with the maintainer guide.
  • The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines.
  • Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all find_package calls are REQUIRED, are satisfied by vcpkg.json's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx.
  • The versioning scheme in vcpkg.json matches what upstream says.
  • The license declaration in vcpkg.json matches what upstream says.
  • The installed as the "copyright" file matches what upstream says.
  • The source code of the component installed comes from an authoritative source.
  • The generated "usage text" is accurate. See adding-usage for context.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is in the new port's versions file.
  • Only one version is added to each modified port's versions file.

@talregev
Copy link
Contributor Author

talregev commented Jan 6, 2025

I didn't find sdflib name nor the maintainer on https://repology.org/
I create a PR for the patch file:
UPC-ViRVIG/SdfLib#15

This port is needed for update mujoco:
https://github.com/google-deepmind/mujoco/blob/main/cmake/MujocoDependencies.cmake#L198

@talregev talregev marked this pull request as draft January 6, 2025 20:34
@talregev talregev marked this pull request as ready for review January 6, 2025 20:47
@MonicaLiu0311 MonicaLiu0311 added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Jan 7, 2025
@talregev talregev force-pushed the TalR/sdflib branch 4 times, most recently from dce6439 to ed7a5d7 Compare January 7, 2025 07:05
@MonicaLiu0311
Copy link
Contributor

MonicaLiu0311 commented Jan 8, 2025

When testing usage, the following error occurs:

-- Configuring done (5.8s)
CMake Error at E:/sdflib/installed/x64-windows/share/sdflib/SdfLibConfig.cmake:60 (set_target_properties):
  The link interface of target "SdfLib::SdfLib" contains:

    glm::glm

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  E:/sdflib/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
  CMakeLists.txt:9 (find_package)


-- Generating done (0.0s)
CMake Generate step failed.  Build files cannot be regenerated correctly.
test.cpp
#include <iostream>
#include "SdfLib/RealSdf.h"

using namespace std;

int main()
{
cout << "Hello CMake." << endl;
return 0;
}

CMakeLists.txt
cmake_minimum_required (VERSION 3.8)

set(CMAKE_TOOLCHAIN_FILE "E:/sdflib/scripts/buildsystems/vcpkg.cmake")

project ("test")

add_library (main "test.cpp")

find_package(SdfLib CONFIG REQUIRED)
target_link_libraries(main PRIVATE SdfLib::icg SdfLib::SdfLib)

@talregev
Copy link
Contributor Author

talregev commented Jan 8, 2025

When testing usage, the following error occurs:

-- Configuring done (5.8s)
CMake Error at E:/sdflib/installed/x64-windows/share/sdflib/SdfLibConfig.cmake:60 (set_target_properties):
  The link interface of target "SdfLib::SdfLib" contains:

    glm::glm

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  E:/sdflib/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
  CMakeLists.txt:9 (find_package)


-- Generating done (0.0s)
CMake Generate step failed.  Build files cannot be regenerated correctly.

test.cpp
CMakeLists.txt

@MonicaLiu0311
I added:

include(CMakeFindDependencyMacro)
find_dependency(glm CONFIG)
find_dependency(spdlog CONFIG)
find_dependency(cereal CONFIG)

Can you test the port again? Thank you for your review.

@talregev talregev force-pushed the TalR/sdflib branch 2 times, most recently from 7378dd1 to 594983f Compare January 9, 2025 20:19
@talregev
Copy link
Contributor Author

talregev commented Jan 9, 2025

@MonicaLiu0311 The PR is ready for review.

@talregev talregev requested a review from MonicaLiu0311 January 9, 2025 20:23
@dg0yt
Copy link
Contributor

dg0yt commented Jan 9, 2025

It only takes three or four simple files to make a test port to automate the usage test. Example: https://github.com/microsoft/vcpkg/pull/43179/files

@talregev
Copy link
Contributor Author

talregev commented Jan 9, 2025

It only takes three or four simple files to make a test port to automate the usage test. Example: https://github.com/microsoft/vcpkg/pull/43179/files

I am in favor to add automated test port:
#40725

@MonicaLiu0311
Copy link
Contributor

MonicaLiu0311 commented Jan 10, 2025

After the installation is complete, there is no usage, perhaps the patch is incorrect.
image

@MonicaLiu0311 MonicaLiu0311 marked this pull request as draft January 10, 2025 01:54
@talregev
Copy link
Contributor Author

talregev commented Jan 10, 2025

After the installation is complete, there is no usage, perhaps the patch is incorrect.

It because the file name is unofficial

@talregev talregev force-pushed the TalR/sdflib branch 4 times, most recently from 1d17394 to b667444 Compare January 10, 2025 06:18
@talregev talregev marked this pull request as ready for review January 10, 2025 06:19
@talregev
Copy link
Contributor Author

@MonicaLiu0311 The PR is ready for review.

@talregev
Copy link
Contributor Author

After the installation is complete, there is no usage, perhaps the patch is incorrect.

It because the file name is unofficial

I prefer to change back the file name and remove the prefix unofficial from file name. It will also help to detect this port by other ports (mujoco), and remove the manual usage. And just have unofficial in the name space.

Let me know if you agree to that change.

ports/sdflib/add_export.patch Outdated Show resolved Hide resolved
ports/sdflib/portfile.cmake Outdated Show resolved Hide resolved
ports/sdflib/portfile.cmake Outdated Show resolved Hide resolved
ports/sdflib/portfile.cmake Show resolved Hide resolved
ports/sdflib/portfile.cmake Outdated Show resolved Hide resolved
ports/sdflib/usage Outdated Show resolved Hide resolved
@MonicaLiu0311 MonicaLiu0311 marked this pull request as draft January 10, 2025 07:34
@talregev talregev force-pushed the TalR/sdflib branch 2 times, most recently from dc9d01d to fdae9c5 Compare January 10, 2025 07:49
Signed-off-by: Tal Regev <[email protected]>
@talregev talregev marked this pull request as ready for review January 10, 2025 07:53
@talregev
Copy link
Contributor Author

@MonicaLiu0311 I apply all your changes. Please review again. Thank you for your effort! 🙏🏻

@MonicaLiu0311
Copy link
Contributor

The usage test passed on x64-windows (header files found).

@MonicaLiu0311 MonicaLiu0311 added the info:reviewed Pull Request changes follow basic guidelines label Jan 10, 2025
@vicroms vicroms merged commit 65d4d8f into microsoft:master Jan 11, 2025
17 checks passed
@talregev talregev deleted the TalR/sdflib branch January 13, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants