diff --git a/.ci/initial-cache.gh.cmake b/.ci/initial-cache.gh.cmake index 795e54db6..8b6e2f421 100644 --- a/.ci/initial-cache.gh.cmake +++ b/.ci/initial-cache.gh.cmake @@ -1,6 +1,7 @@ # Dependencies options set(ROBOTOLOGY_USES_GAZEBO ON CACHE BOOL "") -set(ROBOTOLOGY_USES_MUJOCO ON CACHE BOOL "") +# ROBOTOLOGY_USES_MUJOCO is not really used as of January 2024 +set(ROBOTOLOGY_USES_MUJOCO OFF CACHE BOOL "") set(ROBOTOLOGY_USES_PCL_AND_VTK ON CACHE BOOL "") # Octave is not supported on Windows or on Conda diff --git a/cmake/BuildICUB.cmake b/cmake/BuildICUB.cmake index 4efa73687..a5fb13608 100644 --- a/cmake/BuildICUB.cmake +++ b/cmake/BuildICUB.cmake @@ -101,6 +101,7 @@ ycm_ep_helper(ICUB TYPE GIT ${ICUB_PYTHON_INSTALL_CMAKE_ARGS}) set(ICUB_CONDA_DEPENDENCIES ace libopencv gsl ipopt libode qt-main sdl) +set(ICUB_CONDA_BUILD_DEPENDENCIES_EXPLICIT) if(NOT (APPLE OR WIN32)) list(APPEND ICUB_CONDA_DEPENDENCIES libdc1394) @@ -118,7 +119,7 @@ if(ROBOTOLOGY_USES_ESDCAN) endif() if(ICUB_COMPILE_BINDINGS) - list(APPEND ICUB_CONDA_DEPENDENCIES swig) + list(APPEND ICUB_CONDA_BUILD_DEPENDENCIES_EXPLICIT swig) endif() if(ROBOTOLOGY_USES_PYTHON) diff --git a/conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake b/conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake index 38ce4fbca..d3935ed9f 100644 --- a/conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake +++ b/conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake @@ -183,6 +183,13 @@ macro(generate_metametadata_file) endforeach() endif() + if(NOT "${${_cmake_pkg}_CONDA_BUILD_DEPENDENCIES_EXPLICIT}" STREQUAL "") + string(APPEND metametadata_file_contents " build_dependencies_explicit:\n") + foreach(_build_dep IN LISTS ${_cmake_pkg}_CONDA_BUILD_DEPENDENCIES_EXPLICIT) + string(APPEND metametadata_file_contents " - ${_build_dep}\n") + endforeach() + endif() + if(NOT "${${_cmake_pkg}_CONDA_ENTRY_POINTS}" STREQUAL "") string(APPEND metametadata_file_contents " entry_points:\n") foreach(_entry_point IN LISTS ${_cmake_pkg}_CONDA_ENTRY_POINTS) diff --git a/conda/cmake_recipe_template/meta.yaml b/conda/cmake_recipe_template/meta.yaml index ebe43a880..4ca3fccfd 100644 --- a/conda/cmake_recipe_template/meta.yaml +++ b/conda/cmake_recipe_template/meta.yaml @@ -24,6 +24,8 @@ requirements: - cmake - pkg-config - ninja +{% for build_dep in build_dependencies_explicit %} - {{ build_dep }} +{% endfor %} {# Handle specific packages required for gl on Linux, see https://conda-forge.org/docs/maintainer/knowledge_base.html?#libgl #} {# libxcb, libxfixes, libxau and expat are not documented anywhere, but without those blocktest does not build correctly #} {% if require_opengl_linux %}{% raw %} - {{ cdt('mesa-libgl-devel') }} diff --git a/conda/conda_build_config.yml b/conda/conda_build_config.yml index be9ec515a..1e48918ff 100644 --- a/conda/conda_build_config.yml +++ b/conda/conda_build_config.yml @@ -8,3 +8,9 @@ qt: qt_main: - 5.15 + +# Workaround for: +# * https://github.com/robotology/robotology-superbuild/pull/1574#issuecomment-1898498891 +# * https://github.com/robotology/robotology-superbuild/issues/1572#issuecomment-1911740644 +swig: + - 4.1.0 diff --git a/doc/developers-faqs.md b/doc/developers-faqs.md index 228abcb66..29adf501f 100644 --- a/doc/developers-faqs.md +++ b/doc/developers-faqs.md @@ -93,6 +93,7 @@ This action will automatically perform the following steps: | `_CONDA_PKG_NAME` | The name that will be used for the conda package name. The convention is to use lowercase names separated by dashes. | The name of the github repo of the package. | | `_CONDA_DEPENDENCIES` | The list of conda-forge dependencies required by this package. Note that dependencies managed by the robotology-superbuild should not be listed, as those are handled automatically. | The default value is empty. | | `_CONDA_RUN_DEPENDENCIES_EXPLICIT` | The list of conda-forge run dependencies required by this package. Note that most C++ dependencies are not required as they have run_exports to automatically handle this, but this may be required for Python dependencies. | The default value is empty. | +| `_CONDA_BUILD_DEPENDENCIES_EXPLICIT` | The list of conda-forge build dependencies required by this package. Note that it is not necessary to explicitly add C/C++ compilers, `cmake`, `ninja`, `pkg-config` and `make`, as they are added automatically. | | `_CONDA_VERSION` | The version that will be used for the conda package, by default it is not set as the value from the tag will be extracted. | The default value is to use the value of the tag, removing any occurence of the `v` letter. | | `_CONDA_ENTRY_POINTS` | This option permits to specify explicitly the entry_points used by a pure_python package (see https://github.com/robotology/robotology-superbuild/issues/1105). | Empty. |