mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-10-30 07:11:38 +00:00
Convert dependencies to submodules.
This commit is contained in:
parent
b9c6b36a4d
commit
14b7fd3445
10 changed files with 53 additions and 31 deletions
9
.gitmodules
vendored
Normal file
9
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[submodule "thirdparty/xxHash"]
|
||||
path = thirdparty/xxHash
|
||||
url = https://github.com/Cyan4973/xxHash.git
|
||||
[submodule "thirdparty/fmt"]
|
||||
path = thirdparty/fmt
|
||||
url = https://github.com/fmtlib/fmt.git
|
||||
[submodule "thirdparty/tomlplusplus"]
|
||||
path = thirdparty/tomlplusplus
|
||||
url = https://github.com/marzer/tomlplusplus.git
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
cmake_minimum_required (VERSION 3.20)
|
||||
|
||||
include($ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake)
|
||||
set(THIRDPARTY_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
|
@ -16,10 +15,10 @@ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
|||
|
||||
include("cmake/bin2h.cmake")
|
||||
|
||||
add_subdirectory(${THIRDPARTY_ROOT}/disasm)
|
||||
add_subdirectory(${THIRDPARTY_ROOT})
|
||||
set(POWERANALYSE_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/PowerAnalyse)
|
||||
set(POWERRECOMP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/PowerRecomp)
|
||||
set(POWERUTILS_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/PowerUtils)
|
||||
set(POWERRECOMP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/PowerRecomp)
|
||||
|
||||
project ("PowerRecomp-ALL")
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,13 @@
|
|||
|
||||
project("PowerAnalyse")
|
||||
|
||||
add_executable(PowerAnalyse "main.cpp" "function.h" "function.cpp")
|
||||
add_library(LibPowerAnalyse "function.h" "function.cpp")
|
||||
|
||||
find_package(fmt CONFIG REQUIRED)
|
||||
|
||||
target_include_directories(LibPowerAnalyse PUBLIC .)
|
||||
target_link_libraries(LibPowerAnalyse PUBLIC PowerUtils)
|
||||
add_executable(PowerAnalyse
|
||||
"main.cpp"
|
||||
"function.cpp")
|
||||
|
||||
target_link_libraries(PowerAnalyse PRIVATE PowerUtils fmt::fmt)
|
||||
|
||||
add_library(LibPowerAnalyse "function.cpp")
|
||||
target_include_directories(LibPowerAnalyse PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(LibPowerAnalyse PUBLIC PowerUtils)
|
||||
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ int main()
|
|||
|
||||
if (f.base == 0x82BD7420)
|
||||
{
|
||||
__debugbreak();
|
||||
__builtin_debugtrap();
|
||||
}
|
||||
|
||||
image.symbols.emplace(fmt::format("sub_{:X}", f.base), f.base, f.size, Symbol_Function);
|
||||
|
|
|
|||
|
|
@ -2,17 +2,26 @@ cmake_minimum_required (VERSION 3.8)
|
|||
|
||||
project("PowerRecomp")
|
||||
|
||||
BIN2H(SOURCE_FILE ${POWERUTILS_ROOT}/ppc_context.h HEADER_FILE "generated/ppc_context.gen.h" ARRAY_TYPE "char" VARIABLE_NAME "g_PPCContextText")
|
||||
BIN2H(SOURCE_FILE
|
||||
${POWERUTILS_ROOT}/ppc_context.h
|
||||
HEADER_FILE "generated/ppc_context.gen.h"
|
||||
ARRAY_TYPE "char"
|
||||
VARIABLE_NAME "g_PPCContextText")
|
||||
|
||||
add_executable(PowerRecomp
|
||||
"main.cpp"
|
||||
"recompiler.cpp"
|
||||
"test_recompiler.cpp"
|
||||
"recompiler_config.cpp")
|
||||
|
||||
add_executable(PowerRecomp "main.cpp" "pch.h" "recompiler.cpp" "recompiler.h" "test_recompiler.cpp" "test_recompiler.h" "recompiler_config.h" "recompiler_config.cpp")
|
||||
target_precompile_headers(PowerRecomp PUBLIC "pch.h")
|
||||
|
||||
find_package(fmt CONFIG REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(tomlplusplus REQUIRED IMPORTED_TARGET tomlplusplus)
|
||||
find_package(xxHash CONFIG REQUIRED)
|
||||
|
||||
target_link_libraries(PowerRecomp PRIVATE LibPowerAnalyse fmt::fmt PkgConfig::tomlplusplus xxHash::xxhash)
|
||||
target_link_libraries(PowerRecomp PRIVATE
|
||||
LibPowerAnalyse
|
||||
PowerUtils
|
||||
fmt::fmt
|
||||
tomlplusplus::tomlplusplus
|
||||
xxHash::xxhash)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
target_compile_options(PowerRecomp PRIVATE -Wno-switch -Wno-unused-variable -Wno-null-arithmetic)
|
||||
|
|
|
|||
13
thirdparty/CMakeLists.txt
vendored
Normal file
13
thirdparty/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
add_subdirectory(${THIRDPARTY_ROOT}/disasm)
|
||||
|
||||
if (NOT TARGET fmt::fmt)
|
||||
add_subdirectory(${THIRDPARTY_ROOT}/fmt)
|
||||
endif()
|
||||
|
||||
if (NOT TARGET tomlplusplus::tomlplusplus)
|
||||
add_subdirectory(${THIRDPARTY_ROOT}/tomlplusplus)
|
||||
endif()
|
||||
|
||||
if (NOT TARGET xxHash::xxhash)
|
||||
add_subdirectory(${THIRDPARTY_ROOT}/xxHash/cmake_unofficial)
|
||||
endif()
|
||||
1
thirdparty/fmt
vendored
Submodule
1
thirdparty/fmt
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 873670ba3f9e7bc77ec2c1c94b04f1f8bef77e9f
|
||||
1
thirdparty/tomlplusplus
vendored
Submodule
1
thirdparty/tomlplusplus
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit c4369ae1d8955cae20c4ab40b9813ef4b60e48be
|
||||
1
thirdparty/xxHash
vendored
Submodule
1
thirdparty/xxHash
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 2bf8313b934633b2a5b7e8fd239645b85e10c852
|
||||
12
vcpkg.json
12
vcpkg.json
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"builtin-baseline": "e63bd09dc0b7204467705c1c7c71d0e2a3f8860b",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "pkgconf",
|
||||
"platform": "windows"
|
||||
},
|
||||
"fmt",
|
||||
"tomlplusplus",
|
||||
"xxhash"
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue