Skip to content

Commit

Permalink
Migrate all SDK code to UESDK repository
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Dec 26, 2023
1 parent ac82f2a commit 90ea31e
Show file tree
Hide file tree
Showing 100 changed files with 29 additions and 13,583 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "dependencies/submodules/imgui"]
path = dependencies/submodules/imgui
url = https://github.com/ocornut/imgui.git
[submodule "dependencies/submodules/UESDK"]
path = dependencies/submodules/UESDK
url = [email protected]:praydog/UESDK.git
176 changes: 17 additions & 159 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ endif()

set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

add_subdirectory(dependencies/submodules/UESDK)

include(FetchContent)

message(STATUS "Fetching bddisasm (v1.34.10)...")
Expand Down Expand Up @@ -200,28 +202,28 @@ target_include_directories(spdlog PUBLIC
unset(CMKR_TARGET)
unset(CMKR_SOURCES)

# Target glm_static
set(CMKR_TARGET glm_static)
set(glm_static_SOURCES "")
# Target glm
set(CMKR_TARGET glm)
set(glm_SOURCES "")

list(APPEND glm_static_SOURCES
list(APPEND glm_SOURCES
"dependencies/submodules/glm/glm/detail/glm.cpp"
)

list(APPEND glm_static_SOURCES
list(APPEND glm_SOURCES
cmake.toml
)

set(CMKR_SOURCES ${glm_static_SOURCES})
add_library(glm_static STATIC)
set(CMKR_SOURCES ${glm_SOURCES})
add_library(glm STATIC)

if(glm_static_SOURCES)
target_sources(glm_static PRIVATE ${glm_static_SOURCES})
if(glm_SOURCES)
target_sources(glm PRIVATE ${glm_SOURCES})
endif()

source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${glm_static_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${glm_SOURCES})

target_include_directories(glm_static PUBLIC
target_include_directories(glm PUBLIC
"dependencies/submodules/glm"
)

Expand Down Expand Up @@ -319,151 +321,6 @@ target_include_directories(imgui PUBLIC
unset(CMKR_TARGET)
unset(CMKR_SOURCES)

# Target sdk
set(CMKR_TARGET sdk)
set(sdk_SOURCES "")

list(APPEND sdk_SOURCES
"shared/sdk/AActor.cpp"
"shared/sdk/APawn.cpp"
"shared/sdk/APlayerCameraManager.cpp"
"shared/sdk/APlayerController.cpp"
"shared/sdk/CVar.cpp"
"shared/sdk/ConsoleManager.cpp"
"shared/sdk/DynamicRHI.cpp"
"shared/sdk/EngineModule.cpp"
"shared/sdk/FArrayProperty.cpp"
"shared/sdk/FBoolProperty.cpp"
"shared/sdk/FEnumProperty.cpp"
"shared/sdk/FField.cpp"
"shared/sdk/FMalloc.cpp"
"shared/sdk/FName.cpp"
"shared/sdk/FObjectProperty.cpp"
"shared/sdk/FProperty.cpp"
"shared/sdk/FRenderTargetPool.cpp"
"shared/sdk/FSceneView.cpp"
"shared/sdk/FStructProperty.cpp"
"shared/sdk/FViewportInfo.cpp"
"shared/sdk/Globals.cpp"
"shared/sdk/ScriptMatrix.cpp"
"shared/sdk/ScriptRotator.cpp"
"shared/sdk/ScriptTransform.cpp"
"shared/sdk/ScriptVector.cpp"
"shared/sdk/Slate.cpp"
"shared/sdk/StereoStuff.cpp"
"shared/sdk/UActorComponent.cpp"
"shared/sdk/UCameraComponent.cpp"
"shared/sdk/UClass.cpp"
"shared/sdk/UEngine.cpp"
"shared/sdk/UEnum.cpp"
"shared/sdk/UFunction.cpp"
"shared/sdk/UGameEngine.cpp"
"shared/sdk/UGameViewportClient.cpp"
"shared/sdk/UGameplayStatics.cpp"
"shared/sdk/UObject.cpp"
"shared/sdk/UObjectArray.cpp"
"shared/sdk/UObjectBase.cpp"
"shared/sdk/UObjectHashTables.cpp"
"shared/sdk/UProperty.cpp"
"shared/sdk/USceneComponent.cpp"
"shared/sdk/Utility.cpp"
"shared/sdk/AActor.hpp"
"shared/sdk/APawn.hpp"
"shared/sdk/APlayerCameraManager.hpp"
"shared/sdk/APlayerController.hpp"
"shared/sdk/CVar.hpp"
"shared/sdk/ConsoleManager.hpp"
"shared/sdk/DynamicRHI.hpp"
"shared/sdk/EngineModule.hpp"
"shared/sdk/FArrayProperty.hpp"
"shared/sdk/FBoolProperty.hpp"
"shared/sdk/FEnumProperty.hpp"
"shared/sdk/FField.hpp"
"shared/sdk/FFieldClass.hpp"
"shared/sdk/FMalloc.hpp"
"shared/sdk/FName.hpp"
"shared/sdk/FObjectProperty.hpp"
"shared/sdk/FProperty.hpp"
"shared/sdk/FRenderTargetPool.hpp"
"shared/sdk/FSceneView.hpp"
"shared/sdk/FStructProperty.hpp"
"shared/sdk/FViewportInfo.hpp"
"shared/sdk/Globals.hpp"
"shared/sdk/Math.hpp"
"shared/sdk/RHICommandList.hpp"
"shared/sdk/ScriptMatrix.hpp"
"shared/sdk/ScriptRotator.hpp"
"shared/sdk/ScriptTransform.hpp"
"shared/sdk/ScriptVector.hpp"
"shared/sdk/Slate.hpp"
"shared/sdk/StereoStuff.hpp"
"shared/sdk/TArray.hpp"
"shared/sdk/UActorComponent.hpp"
"shared/sdk/UCameraComponent.hpp"
"shared/sdk/UClass.hpp"
"shared/sdk/UEngine.hpp"
"shared/sdk/UEnum.hpp"
"shared/sdk/UFunction.hpp"
"shared/sdk/UGameEngine.hpp"
"shared/sdk/UGameViewportClient.hpp"
"shared/sdk/UGameplayStatics.hpp"
"shared/sdk/UObject.hpp"
"shared/sdk/UObjectArray.hpp"
"shared/sdk/UObjectBase.hpp"
"shared/sdk/UObjectHashTables.hpp"
"shared/sdk/UProperty.hpp"
"shared/sdk/USceneComponent.hpp"
"shared/sdk/UWorld.hpp"
"shared/sdk/Utility.hpp"
"shared/sdk/threading/GameThreadWorker.hpp"
"shared/sdk/threading/RHIThreadWorker.hpp"
"shared/sdk/threading/RenderThreadWorker.hpp"
"shared/sdk/threading/ThreadWorker.hpp"
"shared/sdk/vtables/IXRTrackingSystemVTables.hpp"
)

list(APPEND sdk_SOURCES
cmake.toml
)

set(CMKR_SOURCES ${sdk_SOURCES})
add_library(sdk STATIC)

if(sdk_SOURCES)
target_sources(sdk PRIVATE ${sdk_SOURCES})
endif()

target_compile_features(sdk PUBLIC
cxx_std_23
)

target_compile_options(sdk PUBLIC
"/EHa"
"/MP"
)

target_include_directories(sdk PUBLIC
"shared/"
)

target_link_libraries(sdk PUBLIC
spdlog
bddisasm
bdshemu
glm_static
asmjit
)

target_link_libraries(sdk PUBLIC
kananlib
Version
TracyClient
nlohmann_json
)

unset(CMKR_TARGET)
unset(CMKR_SOURCES)

# Target plugin_renderlib
set(CMKR_TARGET plugin_renderlib)
set(plugin_renderlib_SOURCES "")
Expand Down Expand Up @@ -587,7 +444,7 @@ target_include_directories(sdk-test PUBLIC

target_link_libraries(sdk-test PUBLIC
kananlib
sdk
uesdk
)

unset(CMKR_TARGET)
Expand Down Expand Up @@ -897,7 +754,7 @@ target_link_libraries(ue4poc PUBLIC
d3d11
d3d12
safetyhook
glm_static
glm
imgui
openvr_api
openxr_loader
Expand All @@ -907,11 +764,12 @@ target_link_libraries(ue4poc PUBLIC
DirectXTK
DirectXTK12
sdkgenny
asmjit
)

target_link_libraries(ue4poc PUBLIC
kananlib
sdk
uesdk
)

set_target_properties(ue4poc PROPERTIES
Expand Down
37 changes: 8 additions & 29 deletions cmake.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ if ("${CMAKE_BUILD_TYPE}" MATCHES "Release")
endif()
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
add_subdirectory(dependencies/submodules/UESDK)
"""

[target.spdlog]
Expand All @@ -36,7 +38,7 @@ include-directories = ["dependencies/submodules/spdlog/include"]
compile-definitions = ["SPDLOG_COMPILED_LIB"]
alias="spdlog::spdlog"

[target.glm_static]
[target.glm]
type = "static"
sources = ["dependencies/submodules/glm/glm/**.cpp"]
include-directories = ["dependencies/submodules/glm"]
Expand Down Expand Up @@ -122,30 +124,6 @@ compile-definitions = [
"IMGUI_USER_CONFIG=\"${CMAKE_CURRENT_SOURCE_DIR}/src/ue4poc-imgui/ue4poc_imconfig.hpp\"",
]

[template.sdk-template]
type = "static"
sources = ["shared/sdk/**.cpp", "shared/sdk/**.c"]
headers = ["shared/sdk/**.hpp", "shared/sdk/**.h"]
include-directories = ["shared/"]
compile-options = ["/EHa", "/MP"]
compile-features = ["cxx_std_23"]
link-libraries = [
"spdlog",
"bddisasm",
"bdshemu",
"glm_static",
"asmjit"
]

[target.sdk]
type = "sdk-template"
link-libraries = [
"kananlib",
"Version",
"TracyClient",
"nlohmann_json"
]

[target.plugin_renderlib]
type = "static"
sources = ["examples/renderlib/**.cpp", "examples/renderlib/**.c"]
Expand Down Expand Up @@ -178,7 +156,7 @@ include-directories = ["shared/", "include/"]
compile-features = ["cxx_std_23"]
link-libraries = [
"kananlib",
"sdk"
"uesdk"
]

[target.vr-plugin-nullifier]
Expand Down Expand Up @@ -245,7 +223,7 @@ link-libraries = [
"d3d11",
"d3d12",
"safetyhook",
"glm_static",
"glm",
"imgui",
"openvr_api",
"openxr_loader",
Expand All @@ -254,7 +232,8 @@ link-libraries = [
"TracyClient",
"DirectXTK",
"DirectXTK12",
"sdkgenny"
"sdkgenny",
"asmjit"
]

[template.ue4template.properties]
Expand All @@ -271,7 +250,7 @@ ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO = "${CMAKE_BINARY_DIR}/lib/${CMKR_TARGET
type="ue4template"
link-libraries = [
"kananlib",
"sdk"
"uesdk"
]
cmake-after="""
add_custom_command(
Expand Down
1 change: 1 addition & 0 deletions dependencies/submodules/UESDK
Submodule UESDK added at 6118d4
Loading

0 comments on commit 90ea31e

Please sign in to comment.