Including PS4 library code in project

I’ve added this in my project’s .Build.cs file:

    if (Target.Platform == UnrealTargetPlatform.PS4)
    {
		string SDKDir = System.Environment.GetEnvironmentVariable("SCE_ORBIS_SDK_DIR");
        if ((SDKDir != null) && (SDKDir.Length > 0))
            PublicIncludePaths.AddRange(new string[] { SDKDir + "/target/include_common", SDKDir + "target/include_common/shader" });

And this in my C++ file:

#if PLATFORM_PS4
#include "pssl_types.h"
#include "GnmResources.h"
#endif

But I still keep getting this when I build:

MainFrameActions: Packaging (PlayStation 4): UnrealBuildTool: [1/3] orbis-clang.exe Module.ConcreteGenie.3_of_3.cpp
MainFrameActions: Packaging (PlayStation 4): UnrealBuildTool: In file included from D:\work2\UnrealProjects\ConcreteGenie\Intermediate\Build\PS4\ConcreteGenie\Development\ConcreteGenie\Module.ConcreteGenie.3_of_3.cpp:38:
MainFrameActions: Packaging (PlayStation 4): UnrealBuildTool: D:\work2\UnrealProjects\ConcreteGenie\Source\ConcreteGenie\dls\PaintSelectionComponent.cpp(23,10) : fatal error: ‘pssl_types.h’ file not found
MainFrameActions: Packaging (PlayStation 4): UnrealBuildTool: #include “pssl_types.h”
MainFrameActions: Packaging (PlayStation 4): UnrealBuildTool: ^

What am I doing wrong?

Thanks!

-dls

Ok – figured it out. This is the business here:

	string SDKDir = System.Environment.GetEnvironmentVariable("SCE_ORBIS_SDK_DIR");
    if ((SDKDir != null) && (SDKDir.Length > 0))
        PublicIncludePaths.AddRange(new string[] 
        { 
            Path.Combine(SDKDir, "target/include_common"), 
            Path.Combine(SDKDir, "target/include_common/shader"),
            Path.Combine(SDKDir, "target/include_common/gnmx"),
        });

I probably would have been ok with the add, but I would have needed a leading slash on the include_common/shader line the path in the environment doesn’t have a trailing slash. I didn’t think about it because I copied the include lines from unreal code, but they were from a mix of Path.Combine and add – doh! :slight_smile: