33// Adjust SDK
44//
55// Created by Uglješa Erceg (@uerceg) on 27th September 2018.
6- // Copyright © 2018-2021 Adjust GmbH. All rights reserved.
6+ // Copyright © 2018-Present Adjust GmbH. All rights reserved.
77//
88
99using System . IO ;
@@ -13,82 +13,37 @@ public class Adjust : ModuleRules
1313{
1414 public Adjust ( ReadOnlyTargetRules Target ) : base ( Target )
1515 {
16- PCHUsage = ModuleRules . PCHUsageMode . UseExplicitOrSharedPCHs ;
16+ PCHUsage = PCHUsageMode . UseExplicitOrSharedPCHs ;
17+ PrivateIncludePaths . Add ( "Adjust/Private" ) ;
1718
18- PublicIncludePaths . AddRange ( new string [ ] { } ) ;
19- PrivateIncludePaths . AddRange ( new string [ ] { "Adjust/Private" } ) ;
19+ PublicDependencyModuleNames . AddRange ( new string [ ] { "Core" , "CoreUObject" , "Engine" } ) ;
2020 PrivateIncludePathModuleNames . AddRange ( new string [ ] { "Settings" } ) ;
21- PublicDependencyModuleNames . AddRange ( new string [ ] { "Core" , "CoreUObject" , "Engine" , "InputCore" , "Projects" } ) ;
22- PrivateDependencyModuleNames . AddRange ( new string [ ] { } ) ;
23- DynamicallyLoadedModuleNames . AddRange ( new string [ ] { } ) ;
2421
25- if ( Target . Platform == UnrealTargetPlatform . IOS )
22+ if ( Target . bBuildEditor )
2623 {
27- bool bHasAdjust = false ;
28- string AdjustNFLDir = "" ;
29- try
30- {
31- AdjustNFLDir = System . IO . Path . Combine ( ModuleDirectory , "../ThirdParty/IOS" ) ;
32- bHasAdjust = System . IO . Directory . Exists ( AdjustNFLDir ) ;
33- }
34- catch ( System . Exception ) { }
24+ PublicDependencyModuleNames . Add ( "BlueprintGraph" ) ;
25+ }
3526
36- if ( bHasAdjust )
37- {
38- string Err = string . Format ( "Adjust SDK found in {0}" , AdjustNFLDir ) ;
39- System . Console . WriteLine ( Err ) ;
40- PublicAdditionalLibraries . Add ( Path . Combine ( AdjustNFLDir , "AdjustSdk.a" ) ) ;
41- PublicWeakFrameworks . AddRange ( new string [ ] { "AdSupport" , "iAd" , "CoreTelephony" , "StoreKit" , "AdServices" , "AppTrackingTransparency" } ) ;
42- PublicLibraryPaths . Add ( AdjustNFLDir ) ;
43- PublicDefinitions . Add ( "WITH_ADJUST=1" ) ;
44- PublicDefinitions . Add ( "UE4_ADJUST_VER=4.20.0" ) ;
45- PrivateIncludePaths . Add ( "Adjust/Private/IOS" ) ;
46- PublicAdditionalLibraries . Add ( "z" ) ;
47- PublicAdditionalLibraries . Add ( "sqlite3" ) ;
48- }
49- else
50- {
51- string Err = string . Format ( "Adjust SDK not found in {0}" , AdjustNFLDir ) ;
52- System . Console . WriteLine ( Err ) ;
53- PublicDefinitions . Add ( "WITH_ADJUST=0" ) ;
54- }
27+ if ( Target . Platform == UnrealTargetPlatform . IOS )
28+ {
29+ PublicAdditionalFrameworks . Add (
30+ new Framework ( "AdjustSdk" , "../ThirdParty/IOS/AdjustSdk.framework.zip" )
31+ ) ;
32+ string AdjustSigLibPath = Path . Combine ( ModuleDirectory , "../ThirdParty/IOS/AdjustSigSdk.a" ) ;
33+ PublicAdditionalLibraries . Add ( AdjustSigLibPath ) ;
34+
35+ PublicWeakFrameworks . AddRange ( new string [ ] {
36+ "AdSupport" ,
37+ "AdServices" ,
38+ "StoreKit" ,
39+ "AppTrackingTransparency"
40+ } ) ;
5541 }
5642 else if ( Target . Platform == UnrealTargetPlatform . Android )
5743 {
58- bool bHasAdjust = false ;
59- string AdjustNFLDir = "" ;
60- try
61- {
62- AdjustNFLDir = System . IO . Path . Combine ( ModuleDirectory , "../ThirdParty/Android" ) ;
63- bHasAdjust = System . IO . Directory . Exists ( AdjustNFLDir ) ;
64- }
65- catch ( System . Exception ) { }
66-
44+ string PluginPath = Utils . MakePathRelativeTo ( ModuleDirectory , Target . RelativeEnginePath ) ;
45+ AdditionalPropertiesForReceipt . Add ( "AndroidPlugin" , System . IO . Path . Combine ( PluginPath , "Adjust_UPL_Android.xml" ) ) ;
6746 PublicIncludePathModuleNames . Add ( "Launch" ) ;
68-
69- if ( bHasAdjust )
70- {
71- string Err = string . Format ( "Adjust SDK found in {0}" , AdjustNFLDir ) ;
72- System . Console . WriteLine ( Err ) ;
73- PublicLibraryPaths . Add ( AdjustNFLDir ) ;
74- PublicDefinitions . Add ( "WITH_ADJUST=1" ) ;
75- PublicDefinitions . Add ( "UE4_ADJUST_VER=4.20.0" ) ;
76-
77- PrivateDependencyModuleNames . AddRange ( new string [ ] { "Launch" , } ) ;
78-
79- string PluginPath = Utils . MakePathRelativeTo ( ModuleDirectory , Target . RelativeEnginePath ) ;
80- AdditionalPropertiesForReceipt . Add ( "AndroidPlugin" , Path . Combine ( PluginPath , "Adjust_UPL_Android.xml" ) ) ;
81- }
82- else
83- {
84- string Err = string . Format ( "Adjust SDK not found in {0}" , AdjustNFLDir ) ;
85- System . Console . WriteLine ( Err ) ;
86- PublicDefinitions . Add ( "WITH_ADJUST=0" ) ;
87- }
88- }
89- else
90- {
91- PublicDefinitions . Add ( "WITH_ADJUST=0" ) ;
9247 }
9348 }
9449}
0 commit comments