mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-05-22 01:42:05 +00:00
Rebrand to XenonRecomp.
This commit is contained in:
parent
7fb8af1bad
commit
87e350906b
CMakeLists.txt
PowerAnalyse
PowerRecomp
PowerUtils
XenonAnalyse
XenonRecomp
CMakeLists.txtmain.cpppch.hrecompiler.cpprecompiler.hrecompiler_config.cpprecompiler_config.htest_recompiler.cpptest_recompiler.h
XenonSample
XenonTests
XenonUtils
CMakeLists.txtbyteswap.hdisasm.cppdisasm.helf.hfile.himage.cppimage.hppc_context.hsection.hsymbol.hsymbol_table.hxbox.h
xbox
xdbf.hxdbf_wrapper.cppxdbf_wrapper.hxex.cppxex.htests
@ -14,18 +14,18 @@ endif()
|
|||||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
|
||||||
add_subdirectory(${THIRDPARTY_ROOT})
|
add_subdirectory(${THIRDPARTY_ROOT})
|
||||||
set(POWERANALYSE_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/PowerAnalyse)
|
set(XENONANALYSE_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/XenonAnalyse)
|
||||||
set(POWERUTILS_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/PowerUtils)
|
set(XENONUTILS_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/XenonUtils)
|
||||||
set(POWERRECOMP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/PowerRecomp)
|
set(XENONRECOMP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/XenonRecomp)
|
||||||
|
|
||||||
project ("PowerRecomp-ALL")
|
project ("XenonRecomp-ALL")
|
||||||
|
|
||||||
add_subdirectory(${POWERANALYSE_ROOT})
|
add_subdirectory(${XENONANALYSE_ROOT})
|
||||||
add_subdirectory(${POWERRECOMP_ROOT})
|
add_subdirectory(${XENONRECOMP_ROOT})
|
||||||
add_subdirectory(${POWERUTILS_ROOT})
|
add_subdirectory(${XENONUTILS_ROOT})
|
||||||
|
|
||||||
# Only build sample and tests if this is the top level project
|
# Only build sample and tests if this is the top level project
|
||||||
if (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
|
if (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
|
||||||
add_subdirectory(PowerSample)
|
add_subdirectory(XenonSample)
|
||||||
add_subdirectory(PowerTests)
|
add_subdirectory(XenonTests)
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
# cmake_minimum_required (VERSION 3.16)
|
|
||||||
|
|
||||||
project("PowerAnalyse")
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
cmake_minimum_required (VERSION 3.8)
|
|
||||||
|
|
||||||
project("PowerRecomp")
|
|
||||||
|
|
||||||
add_executable(PowerRecomp
|
|
||||||
"main.cpp"
|
|
||||||
"recompiler.cpp"
|
|
||||||
"test_recompiler.cpp"
|
|
||||||
"recompiler_config.cpp")
|
|
||||||
|
|
||||||
target_precompile_headers(PowerRecomp PUBLIC "pch.h")
|
|
||||||
|
|
||||||
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)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_compile_definitions(PowerRecomp PRIVATE _CRT_SECURE_NO_WARNINGS)
|
|
@ -1,5 +0,0 @@
|
|||||||
project("PowerUtils")
|
|
||||||
add_library(PowerUtils "disasm.h" "disasm.cpp" "file.h" "xex.cpp" "image.h" "image.cpp" "elf.h" "ppc_context.h" "symbol.h" "symbol_table.h" "section.h" "xdbf_wrapper.cpp" "byteswap.h")
|
|
||||||
|
|
||||||
target_include_directories(PowerUtils PUBLIC .)
|
|
||||||
target_link_libraries(PowerUtils PUBLIC disasm)
|
|
14
XenonAnalyse/CMakeLists.txt
Normal file
14
XenonAnalyse/CMakeLists.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# cmake_minimum_required (VERSION 3.16)
|
||||||
|
|
||||||
|
project("XenonAnalyse")
|
||||||
|
|
||||||
|
add_executable(XenonAnalyse
|
||||||
|
"main.cpp"
|
||||||
|
"function.cpp")
|
||||||
|
|
||||||
|
target_link_libraries(XenonAnalyse PRIVATE XenonUtils fmt::fmt)
|
||||||
|
|
||||||
|
add_library(LibXenonAnalyse "function.cpp")
|
||||||
|
target_include_directories(LibXenonAnalyse PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
target_link_libraries(LibXenonAnalyse PUBLIC XenonUtils)
|
||||||
|
|
24
XenonRecomp/CMakeLists.txt
Normal file
24
XenonRecomp/CMakeLists.txt
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
cmake_minimum_required (VERSION 3.8)
|
||||||
|
|
||||||
|
project("XenonRecomp")
|
||||||
|
|
||||||
|
add_executable(XenonRecomp
|
||||||
|
"main.cpp"
|
||||||
|
"recompiler.cpp"
|
||||||
|
"test_recompiler.cpp"
|
||||||
|
"recompiler_config.cpp")
|
||||||
|
|
||||||
|
target_precompile_headers(XenonRecomp PUBLIC "pch.h")
|
||||||
|
|
||||||
|
target_link_libraries(XenonRecomp PRIVATE
|
||||||
|
LibXenonAnalyse
|
||||||
|
XenonUtils
|
||||||
|
fmt::fmt
|
||||||
|
tomlplusplus::tomlplusplus
|
||||||
|
xxHash::xxhash)
|
||||||
|
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
target_compile_options(XenonRecomp PRIVATE -Wno-switch -Wno-unused-variable -Wno-null-arithmetic)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_compile_definitions(XenonRecomp PRIVATE _CRT_SECURE_NO_WARNINGS)
|
@ -4,8 +4,8 @@
|
|||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
const char* path =
|
const char* path =
|
||||||
#ifdef CONFIG_FILE_PATH
|
#ifdef XENON_RECOMP_CONFIG_FILE_PATH
|
||||||
CONFIG_FILE_PATH
|
XENON_RECOMP_CONFIG_FILE_PATH
|
||||||
#else
|
#else
|
||||||
argv[1]
|
argv[1]
|
||||||
#endif
|
#endif
|
||||||
@ -24,8 +24,8 @@ int main(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char* headerFilePath =
|
const char* headerFilePath =
|
||||||
#ifdef HEADER_FILE_PATH
|
#ifdef XENON_RECOMP_HEADER_FILE_PATH
|
||||||
HEADER_FILE_PATH
|
XENON_RECOMP_HEADER_FILE_PATH
|
||||||
#else
|
#else
|
||||||
argv[2]
|
argv[2]
|
||||||
#endif
|
#endif
|
@ -1,4 +1,4 @@
|
|||||||
project("PowerSample")
|
project("XenonSample")
|
||||||
|
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
"/D_HAS_EXCEPTIONS=0"
|
"/D_HAS_EXCEPTIONS=0"
|
||||||
@ -9,6 +9,6 @@ add_compile_options(
|
|||||||
"-fno-strict-aliasing")
|
"-fno-strict-aliasing")
|
||||||
|
|
||||||
file(GLOB RecompiledFiles *.cpp)
|
file(GLOB RecompiledFiles *.cpp)
|
||||||
add_library(PowerSample ${RecompiledFiles})
|
add_library(XenonSample ${RecompiledFiles})
|
||||||
|
|
||||||
target_precompile_headers(PowerSample PUBLIC "ppc_recomp_shared.h")
|
target_precompile_headers(XenonSample PUBLIC "ppc_recomp_shared.h")
|
@ -1,4 +1,4 @@
|
|||||||
project("PowerTests")
|
project("XenonTests")
|
||||||
|
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
"-march=x86-64-v3"
|
"-march=x86-64-v3"
|
||||||
@ -8,6 +8,6 @@ add_compile_options(
|
|||||||
file(GLOB TestFiles *.cpp)
|
file(GLOB TestFiles *.cpp)
|
||||||
|
|
||||||
if(TestFiles)
|
if(TestFiles)
|
||||||
add_executable(PowerTests ${TestFiles})
|
add_executable(XenonTests ${TestFiles})
|
||||||
target_link_libraries(PowerTests PUBLIC PowerUtils)
|
target_link_libraries(XenonTests PUBLIC XenonUtils)
|
||||||
endif()
|
endif()
|
10
XenonUtils/CMakeLists.txt
Normal file
10
XenonUtils/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
project("XenonUtils")
|
||||||
|
|
||||||
|
add_library(XenonUtils
|
||||||
|
"disasm.cpp"
|
||||||
|
"xex.cpp"
|
||||||
|
"image.cpp"
|
||||||
|
"xdbf_wrapper.cpp")
|
||||||
|
|
||||||
|
target_include_directories(XenonUtils PUBLIC .)
|
||||||
|
target_link_libraries(XenonUtils PUBLIC disasm)
|
@ -1,5 +1,5 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
pushd PowerAnalyse
|
pushd XenonAnalyse
|
||||||
for %%f in (*.cpp) do call ..\compile.bat %%f
|
for %%f in (*.cpp) do call ..\compile.bat %%f
|
||||||
popd
|
popd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user