I have built an Eigen(Eigen) - Library plugin.
Here is it:
public class EigenPlugin : ModuleRules
{
public EigenPlugin(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicIncludePaths.AddRange(
new string] {
"EigenPlugin/Public",
// ... add public include paths required here ...
}
);
PrivateIncludePaths.AddRange(
new string] {
"EigenPlugin/Private",
// ... add other private include paths required here ...
"../Include"
}
);
Then I can simply test and use this plugin directly like this via building blue print:
#include "EigenBPFunctionLibrary.h"
#include "EigenPlugin.h"
#include <Eigen/Dense>
using Eigen::MatrixXd;
void UEigenBPFunctionLibrary::HelloEigen()
{
MatrixXd m(2, 2);
m(0, 0) = 3;
m(1, 0) = 2.5;
m(0, 1) = -1;
m(1, 1) = m(1, 0) + m(0, 1);
UE_LOG(EigenLog, Display, TEXT("
Simple Eigen matrix values (row-wise) are : %f %f %f %f
"), m(0,0), m(0,1), m(1,0), m(1,1));
MatrixXd m2 = MatrixXd::Random(3, 3);
UE_LOG(EigenLog, Display, TEXT("
Displaying a random matrix of size 3 x 3.
"));
UE_LOG(EigenLog, Display, TEXT("
Random matrix values (row-wise) are : %f %f %f %f %f %f %f %f %f
"), m2(0, 0), m2(0, 1), m2(0, 2), m2(1, 0), m2(1, 1), m2(1, 2), m2(2, 0), m2(2, 1), m2(2, 2));
}
Now suppose I want to build another plugin, say TestVectorLibrariesPlugin, that will depend on Eigen and couple of other libraries. How do I build this ? I made a TestVectorLibrariesPlugin.uplugin entries like this :
"Plugins":
{
"Name": "EigenPlugin",
"Enabled": true
},
{
"Name": "AnotherVectorPlugin",
"Enabled": true
},
Now when I try to include in the TestVectorLibsPlugin like this :
#include <Eigen/StdVector>
I get,
Do I need to explicitly mention where the header files are ? Doesnât the dependencies declarations in the plugin makes the proper includes available ?