Skip to content
Merged

Clean #172

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 16 additions & 28 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,23 @@ set(PROJECT_URL "https://github.com/humanoid-path-planner/${PROJECT_NAME}")
set(CXX_DISABLE_WERROR TRUE)
set(PROJECT_USE_CMAKE_EXPORT TRUE)

# Check if the submodule cmake have been initialized
set(JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}/cmake")
if(EXISTS "${JRL_CMAKE_MODULES}/base.cmake")
message(STATUS "JRL cmakemodules found in 'cmake/' git submodule")
find_package(jrl-cmakemodules QUIET CONFIG)
if(jrl-cmakemodules_FOUND)
get_property(
JRL_CMAKE_MODULES
TARGET jrl-cmakemodules::jrl-cmakemodules
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
)
message(STATUS "JRL cmakemodules found on system at ${JRL_CMAKE_MODULES}")
else()
find_package(jrl-cmakemodules QUIET CONFIG)
if(jrl-cmakemodules_FOUND)
get_property(
JRL_CMAKE_MODULES
TARGET jrl-cmakemodules::jrl-cmakemodules
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
)
message(
STATUS
"JRL cmakemodules found on system at ${JRL_CMAKE_MODULES}"
)
else()
message(STATUS "JRL cmakemodules not found. Let's fetch it.")
include(FetchContent)
FetchContent_Declare(
"jrl-cmakemodules"
GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git"
)
FetchContent_MakeAvailable("jrl-cmakemodules")
FetchContent_GetProperties(
"jrl-cmakemodules"
SOURCE_DIR JRL_CMAKE_MODULES
)
endif()
message(STATUS "JRL cmakemodules not found. Let's fetch it.")
include(FetchContent)
FetchContent_Declare(
"jrl-cmakemodules"
GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git"
)
FetchContent_MakeAvailable("jrl-cmakemodules")
FetchContent_GetProperties("jrl-cmakemodules" SOURCE_DIR JRL_CMAKE_MODULES)
endif()

include("${JRL_CMAKE_MODULES}/hpp.cmake")
Expand Down
119 changes: 31 additions & 88 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 13 additions & 35 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,48 +1,26 @@
{
description = "python bindings for HPP, based on boost python";

inputs = {
gepetto.url = "github:gepetto/nix";

# https://github.com/humanoid-path-planner/hpp-constraints/pull/282 is required
hpp-constraints.url = "github:humanoid-path-planner/hpp-constraints";
hpp-constraints.inputs.gepetto.follows = "gepetto";

# https://github.com/humanoid-path-planner/hpp-core/pull/434 is required
hpp-core.url = "github:humanoid-path-planner/hpp-core";
hpp-core.inputs.gepetto.follows = "gepetto";

# https://github.com/humanoid-path-planner/hpp-manipulation/pull/270 is required
hpp-manipulation.url = "github:humanoid-path-planner/hpp-manipulation";
hpp-manipulation.inputs.gepetto.follows = "gepetto";
};
inputs.gepetto.url = "github:gepetto/nix";

outputs =
inputs:
inputs.gepetto.lib.mkFlakoboros inputs (
{ lib, ... }:
{
overlays = [
inputs.hpp-constraints.overlays.flakoboros
inputs.hpp-core.overlays.flakoboros
inputs.hpp-manipulation.overlays.flakoboros
];
pyOverrideAttrs.hpp-python =
{ drv-prev, python-final, ... }:
{
nativeBuildInputs = drv-prev.nativeBuildInputs ++ [ python-final.pybind11-stubgen ];
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./CMakeLists.txt
./doc
./include
./package.xml
./src
./tests
];
};
pyOverrideAttrs.hpp-python = {
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./CMakeLists.txt
./doc
./include
./package.xml
./src
./tests
];
};
};
}
);
}