Skip to content

Conversation

@shixiong2333
Copy link
Contributor

@shixiong2333 shixiong2333 commented Dec 23, 2025

🤓 This is a prerequisite for adding the pinocchio port (#8928). The next step is to add the coal port, both of which will utilize jrl-cmakemodules.

🥵 As described in the usage, jrl-cmakemodules need to be imported before defining the project in CMake. However, my testing revealed that some vcpkg-related configurations only take effect after the project is defined. Therefore, I added project(vcpkg_helper LANGUAGES NONE) at the beginning of the usage (I will add similar patches to CMakeLists.txt for coal and pinocchio later). I feel this is not a good approach. Is there a better way to write it?

  • 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 "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.

Comment on lines +7 to +22
project(MyProject_vcpkg_helper LANGUAGES NONE)

# 2. Find the modules
find_package(jrl-cmakemodules CONFIG REQUIRED)

# 3. MANDATORY: Define metadata required by jrl-cmakemodules
set(PROJECT_NAME MyProject)
set(PROJECT_DESCRIPTION "Description of my project")
set(PROJECT_URL "https://github.com/user/project")

# 4. Include the base infrastructure
include(${jrl-cmakemodules_DIR}/base.cmake)

# 5. Setup project arguments (Version, Policies, etc.)
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
project(MyProject ${PROJECT_ARGS})
Copy link
Member

Choose a reason for hiding this comment

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

This is sufficiently.., strange that I'd like to discuss with the team.

@BillyONeal BillyONeal added the requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look. label Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants