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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[sdflib] new port #43138

wants to merge 1 commit into from

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)

Signed-off-by: Tal Regev <[email protected]>
@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.

Comment on lines +19 to +28
+install(TARGETS ${PROJECT_NAME} icg EXPORT ${PROJECT_NAME}Config
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+)
+
+install(EXPORT ${PROJECT_NAME}Config
+ NAMESPACE ${PROJECT_NAME}::
+ DESTINATION share/sdflib
+)
Copy link
Contributor

Choose a reason for hiding this comment

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

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

If the upstream does not export it, please add "unofficial-" before the config file.

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!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants