Move recompiled files to a separate project.

This commit is contained in:
Skyth 2024-10-07 21:47:00 +03:00
parent 53f4f1058f
commit 81d737e14f
9 changed files with 24 additions and 23 deletions

View file

@ -18,4 +18,5 @@ add_subdirectory(${SWA_THIRDPARTY_ROOT})
project("UnleashedRecomp-ALL")
# Include sub-projects.
add_subdirectory("UnleashedRecompLib")
add_subdirectory("UnleashedRecomp")

View file

@ -1,27 +1,13 @@
project("UnleashedRecomp")
set(TARGET_NAME "SWA")
file(GLOB "*.cpp")
add_compile_definitions(SWA_IMPL)
add_compile_definitions(SDL_MAIN_HANDLED)
# Microsoft wtf?
add_compile_definitions(
_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR
_HAS_EXCEPTIONS=0)
add_compile_options(
"/fp:strict"
"/GS-"
"/EHs-c-"
"-march=sandybridge"
"-fno-strict-aliasing")
file(GLOB SWA_RECOMPILED_SOURCES "ppc/*.cpp")
add_compile_definitions(_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
set(SWA_PRECOMPILED_HEADERS
"ppc/ppc_recomp_shared.h"
"stdafx.h"
)
@ -67,10 +53,11 @@ set(SWA_CXX_SOURCES
${SWA_HID_CXX_SOURCES}
)
add_executable(UnleashedRecomp ${SWA_RECOMPILED_SOURCES} ${SWA_CXX_SOURCES})
add_executable(UnleashedRecomp ${SWA_CXX_SOURCES})
set_target_properties(UnleashedRecomp PROPERTIES OUTPUT_NAME ${TARGET_NAME})
target_link_libraries(UnleashedRecomp PUBLIC
UnleashedRecompLib
PowerUtils
o1heap
xxHash::xxhash
@ -94,5 +81,3 @@ target_include_directories(UnleashedRecomp PRIVATE
)
target_precompile_headers(UnleashedRecomp PUBLIC ${SWA_PRECOMPILED_HEADERS})
target_compile_definitions(PowerRecomp PRIVATE CONFIG_FILE_PATH=\"${CMAKE_CURRENT_SOURCE_DIR}/ppc/config/SWA.toml\")

View file

@ -1,6 +1,4 @@
#pragma once
#include "ppc/ppc_context.h"
#include "ppc/ppc_recomp_shared.h"
inline thread_local PPCContext* gPPCContext;

View file

@ -10,6 +10,7 @@
#include <xxhash.h>
#include <ankerl/unordered_dense.h>
#include <ddspp.h>
#include <ppc/ppc_recomp_shared.h>
#include "framework.h"
#include "Mutex.h"

View file

@ -0,0 +1,14 @@
project("UnleashedRecompLib")
add_compile_options(
"/fp:strict"
"-march=sandybridge"
"-fno-strict-aliasing")
file(GLOB SWA_RECOMPILED_SOURCES "ppc/*.cpp")
add_library(UnleashedRecompLib ${SWA_RECOMPILED_SOURCES})
target_include_directories(UnleashedRecompLib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_precompile_headers(UnleashedRecompLib PUBLIC ppc/ppc_recomp_shared.h)
target_compile_definitions(PowerRecomp PRIVATE CONFIG_FILE_PATH=\"${CMAKE_CURRENT_SOURCE_DIR}/config/SWA.toml\")

View file

@ -1,6 +1,6 @@
[main]
file_path = "../private/default.xex"
out_directory_path = ".."
out_directory_path = "../ppc"
switch_table_file_path = "SWA_switch_tables.toml"
skip_lr = true

2
UnleashedRecompLib/private/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
*
!.gitignore