mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[build] Make Protobuf optional in CMake build (#7061)
This commit is contained in:
@@ -235,5 +235,7 @@ class WPILIB_DLLEXPORT ArmFeedforward {
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/controller/proto/ArmFeedforwardProto.h"
|
||||
#endif
|
||||
#include "frc/controller/struct/ArmFeedforwardStruct.h"
|
||||
|
||||
@@ -87,5 +87,7 @@ class WPILIB_DLLEXPORT DifferentialDriveFeedforward {
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/controller/proto/DifferentialDriveFeedforwardProto.h"
|
||||
#endif
|
||||
#include "frc/controller/struct/DifferentialDriveFeedforwardStruct.h"
|
||||
|
||||
@@ -21,5 +21,7 @@ struct DifferentialDriveWheelVoltages {
|
||||
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/controller/proto/DifferentialDriveWheelVoltagesProto.h"
|
||||
#endif
|
||||
#include "frc/controller/struct/DifferentialDriveWheelVoltagesStruct.h"
|
||||
|
||||
@@ -225,5 +225,7 @@ class ElevatorFeedforward {
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/controller/proto/ElevatorFeedforwardProto.h"
|
||||
#endif
|
||||
#include "frc/controller/struct/ElevatorFeedforwardStruct.h"
|
||||
|
||||
@@ -208,5 +208,7 @@ class WPILIB_DLLEXPORT Ellipse2d {
|
||||
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/geometry/proto/Ellipse2dProto.h"
|
||||
#endif
|
||||
#include "frc/geometry/struct/Ellipse2dStruct.h"
|
||||
|
||||
@@ -213,6 +213,8 @@ void from_json(const wpi::json& json, Pose2d& pose);
|
||||
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/geometry/proto/Pose2dProto.h"
|
||||
#endif
|
||||
#include "frc/geometry/struct/Pose2dStruct.h"
|
||||
#include "frc/geometry/Pose2d.inc"
|
||||
|
||||
@@ -215,5 +215,7 @@ void from_json(const wpi::json& json, Pose3d& pose);
|
||||
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/geometry/proto/Pose3dProto.h"
|
||||
#endif
|
||||
#include "frc/geometry/struct/Pose3dStruct.h"
|
||||
|
||||
@@ -191,5 +191,7 @@ void from_json(const wpi::json& json, Quaternion& quaternion);
|
||||
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/geometry/proto/QuaternionProto.h"
|
||||
#endif
|
||||
#include "frc/geometry/struct/QuaternionStruct.h"
|
||||
|
||||
@@ -206,5 +206,7 @@ class WPILIB_DLLEXPORT Rectangle2d {
|
||||
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/geometry/proto/Rectangle2dProto.h"
|
||||
#endif
|
||||
#include "frc/geometry/struct/Rectangle2dStruct.h"
|
||||
|
||||
@@ -169,6 +169,8 @@ void from_json(const wpi::json& json, Rotation2d& rotation);
|
||||
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/geometry/proto/Rotation2dProto.h"
|
||||
#endif
|
||||
#include "frc/geometry/struct/Rotation2dStruct.h"
|
||||
#include "frc/geometry/Rotation2d.inc"
|
||||
|
||||
@@ -195,5 +195,7 @@ void from_json(const wpi::json& json, Rotation3d& rotation);
|
||||
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/geometry/proto/Rotation3dProto.h"
|
||||
#endif
|
||||
#include "frc/geometry/struct/Rotation3dStruct.h"
|
||||
|
||||
@@ -124,6 +124,8 @@ class WPILIB_DLLEXPORT Transform2d {
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/geometry/proto/Transform2dProto.h"
|
||||
#endif
|
||||
#include "frc/geometry/struct/Transform2dStruct.h"
|
||||
#include "frc/geometry/Transform2d.inc"
|
||||
|
||||
@@ -130,5 +130,7 @@ class WPILIB_DLLEXPORT Transform3d {
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/geometry/proto/Transform3dProto.h"
|
||||
#endif
|
||||
#include "frc/geometry/struct/Transform3dStruct.h"
|
||||
|
||||
@@ -232,6 +232,8 @@ void from_json(const wpi::json& json, Translation2d& state);
|
||||
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/geometry/proto/Translation2dProto.h"
|
||||
#endif
|
||||
#include "frc/geometry/struct/Translation2dStruct.h"
|
||||
#include "frc/geometry/Translation2d.inc"
|
||||
|
||||
@@ -199,6 +199,8 @@ void from_json(const wpi::json& json, Translation3d& state);
|
||||
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/geometry/proto/Translation3dProto.h"
|
||||
#endif
|
||||
#include "frc/geometry/struct/Translation3dStruct.h"
|
||||
#include "frc/geometry/Translation3d.inc"
|
||||
|
||||
@@ -58,5 +58,7 @@ struct WPILIB_DLLEXPORT Twist2d {
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/geometry/proto/Twist2dProto.h"
|
||||
#endif
|
||||
#include "frc/geometry/struct/Twist2dStruct.h"
|
||||
|
||||
@@ -78,5 +78,7 @@ struct WPILIB_DLLEXPORT Twist3d {
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/geometry/proto/Twist3dProto.h"
|
||||
#endif
|
||||
#include "frc/geometry/struct/Twist3dStruct.h"
|
||||
|
||||
@@ -279,5 +279,7 @@ struct WPILIB_DLLEXPORT ChassisSpeeds {
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/kinematics/proto/ChassisSpeedsProto.h"
|
||||
#endif
|
||||
#include "frc/kinematics/struct/ChassisSpeedsStruct.h"
|
||||
|
||||
@@ -99,5 +99,7 @@ class WPILIB_DLLEXPORT DifferentialDriveKinematics
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/kinematics/proto/DifferentialDriveKinematicsProto.h"
|
||||
#endif
|
||||
#include "frc/kinematics/struct/DifferentialDriveKinematicsStruct.h"
|
||||
|
||||
@@ -50,5 +50,7 @@ struct WPILIB_DLLEXPORT DifferentialDriveWheelPositions {
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/kinematics/proto/DifferentialDriveWheelPositionsProto.h"
|
||||
#endif
|
||||
#include "frc/kinematics/struct/DifferentialDriveWheelPositionsStruct.h"
|
||||
|
||||
@@ -113,5 +113,7 @@ struct WPILIB_DLLEXPORT DifferentialDriveWheelSpeeds {
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/kinematics/proto/DifferentialDriveWheelSpeedsProto.h"
|
||||
#endif
|
||||
#include "frc/kinematics/struct/DifferentialDriveWheelSpeedsStruct.h"
|
||||
|
||||
@@ -200,5 +200,7 @@ class WPILIB_DLLEXPORT MecanumDriveKinematics
|
||||
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/kinematics/proto/MecanumDriveKinematicsProto.h"
|
||||
#endif
|
||||
#include "frc/kinematics/struct/MecanumDriveKinematicsStruct.h"
|
||||
|
||||
@@ -61,5 +61,7 @@ struct WPILIB_DLLEXPORT MecanumDriveWheelPositions {
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/kinematics/proto/MecanumDriveWheelPositionsProto.h"
|
||||
#endif
|
||||
#include "frc/kinematics/struct/MecanumDriveWheelPositionsStruct.h"
|
||||
|
||||
@@ -121,5 +121,7 @@ struct WPILIB_DLLEXPORT MecanumDriveWheelSpeeds {
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/kinematics/proto/MecanumDriveWheelSpeedsProto.h"
|
||||
#endif
|
||||
#include "frc/kinematics/struct/MecanumDriveWheelSpeedsStruct.h"
|
||||
|
||||
@@ -43,5 +43,7 @@ struct WPILIB_DLLEXPORT SwerveModulePosition {
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/kinematics/proto/SwerveModulePositionProto.h"
|
||||
#endif
|
||||
#include "frc/kinematics/struct/SwerveModulePositionStruct.h"
|
||||
|
||||
@@ -48,5 +48,7 @@ struct WPILIB_DLLEXPORT SwerveModuleState {
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/kinematics/proto/SwerveModuleStateProto.h"
|
||||
#endif
|
||||
#include "frc/kinematics/struct/SwerveModuleStateStruct.h"
|
||||
|
||||
@@ -115,5 +115,7 @@ class WPILIB_DLLEXPORT CubicHermiteSpline : public Spline<3> {
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/spline/proto/CubicHermiteSplineProto.h"
|
||||
#endif
|
||||
#include "frc/spline/struct/CubicHermiteSplineStruct.h"
|
||||
|
||||
@@ -125,5 +125,7 @@ class WPILIB_DLLEXPORT QuinticHermiteSpline : public Spline<5> {
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/spline/proto/QuinticHermiteSplineProto.h"
|
||||
#endif
|
||||
#include "frc/spline/struct/QuinticHermiteSplineStruct.h"
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include <wpi/protobuf/Protobuf.h>
|
||||
|
||||
#include "frc/proto/MatrixProto.h"
|
||||
#include "frc/system/LinearSystem.h"
|
||||
|
||||
template <int States, int Inputs, int Outputs>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <fmt/format.h>
|
||||
#include <wpi/ProtoHelper.h>
|
||||
|
||||
#include "frc/proto/MatrixProto.h"
|
||||
#include "frc/system/proto/LinearSystemProto.h"
|
||||
#include "system.pb.h"
|
||||
|
||||
|
||||
@@ -146,5 +146,7 @@ void from_json(const wpi::json& json, Trajectory::State& state);
|
||||
|
||||
} // namespace frc
|
||||
|
||||
#ifndef NO_PROTOBUF
|
||||
#include "frc/trajectory/proto/TrajectoryProto.h"
|
||||
#include "frc/trajectory/proto/TrajectoryStateProto.h"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user