mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 17:01:24 +12:00
Merge pull request #4748 from scribam/asmjit
asmjit: update build integration
This commit is contained in:
commit
21a7f1a550
7 changed files with 21 additions and 18 deletions
|
@ -8,7 +8,9 @@ if (WITH_GDB)
|
||||||
add_definitions(-DWITH_GDB_DEBUGGER)
|
add_definitions(-DWITH_GDB_DEBUGGER)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(ASMJIT_STATIC TRUE)
|
set(ASMJIT_EMBED TRUE)
|
||||||
|
set(ASMJIT_DIR "${CMAKE_CURRENT_LIST_DIR}/asmjit" CACHE PATH "Location of 'asmjit'")
|
||||||
|
include("${ASMJIT_DIR}/CMakeLists.txt")
|
||||||
|
|
||||||
if (NOT CMAKE_BUILD_TYPE)
|
if (NOT CMAKE_BUILD_TYPE)
|
||||||
message(STATUS "No build type selected, default to Release")
|
message(STATUS "No build type selected, default to Release")
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define ASMJIT_STATIC
|
#define ASMJIT_EMBED
|
||||||
#define ASMJIT_DEBUG
|
#define ASMJIT_DEBUG
|
||||||
|
|
||||||
#include "asmjit.h"
|
#include <asmjit/asmjit.h>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
|
|
|
@ -294,7 +294,6 @@ ${LLVM_INCLUDE_DIRS}
|
||||||
"${RPCS3_SRC_DIR}/Loader"
|
"${RPCS3_SRC_DIR}/Loader"
|
||||||
"${RPCS3_SRC_DIR}/Crypto"
|
"${RPCS3_SRC_DIR}/Crypto"
|
||||||
"${RPCS3_SRC_DIR}/.."
|
"${RPCS3_SRC_DIR}/.."
|
||||||
"${RPCS3_SRC_DIR}/../asmjit/src/asmjit"
|
|
||||||
"${RPCS3_SRC_DIR}/../3rdparty/GSL/include"
|
"${RPCS3_SRC_DIR}/../3rdparty/GSL/include"
|
||||||
"${RPCS3_SRC_DIR}/../3rdparty/hidapi/hidapi"
|
"${RPCS3_SRC_DIR}/../3rdparty/hidapi/hidapi"
|
||||||
# Includes 3rdparty stuff that isn't included yet
|
# Includes 3rdparty stuff that isn't included yet
|
||||||
|
@ -344,7 +343,6 @@ GLOB_RECURSE
|
||||||
RPCS3_SRC
|
RPCS3_SRC
|
||||||
"${RPCS3_SRC_DIR}/*.cpp"
|
"${RPCS3_SRC_DIR}/*.cpp"
|
||||||
"${RPCS3_SRC_DIR}/../Utilities/*.cpp"
|
"${RPCS3_SRC_DIR}/../Utilities/*.cpp"
|
||||||
"${RPCS3_SRC_DIR}/../asmjit/src/asmjit/*.cpp"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
#File exclusion section
|
#File exclusion section
|
||||||
|
@ -379,6 +377,10 @@ endif()
|
||||||
|
|
||||||
add_dependencies(rpcs3 GitVersion)
|
add_dependencies(rpcs3 GitVersion)
|
||||||
|
|
||||||
|
target_sources(rpcs3 PUBLIC ${ASMJIT_SRC})
|
||||||
|
target_include_directories(rpcs3 PUBLIC ${ASMJIT_INCLUDE_DIR})
|
||||||
|
target_link_libraries(rpcs3 ${ASMJIT_DEPS})
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
find_package(GLEW 1.13.0 REQUIRED)
|
find_package(GLEW 1.13.0 REQUIRED)
|
||||||
target_link_libraries(rpcs3 GLEW::GLEW)
|
target_link_libraries(rpcs3 GLEW::GLEW)
|
||||||
|
@ -422,8 +424,7 @@ else()
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(rpcs3 ${CMAKE_DL_LIBS} ZLIB::ZLIB ${ADDITIONAL_LIBS})
|
target_link_libraries(rpcs3 ${CMAKE_DL_LIBS} ZLIB::ZLIB ${ADDITIONAL_LIBS})
|
||||||
if(USE_SYSTEM_FFMPEG)
|
if(USE_SYSTEM_FFMPEG)
|
||||||
link_libraries(${FFMPEG_LIBRARY_DIR})
|
target_link_libraries(rpcs3 ${FFMPEG_LIBRARIES})
|
||||||
target_link_libraries(rpcs3 libavformat.so libavcodec.so libavutil.so libswscale.so)
|
|
||||||
else()
|
else()
|
||||||
target_link_libraries(rpcs3 libavformat.a libavcodec.a libavutil.a libswscale.a)
|
target_link_libraries(rpcs3 libavformat.a libavcodec.a libavutil.a libswscale.a)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -247,7 +247,7 @@ namespace vk
|
||||||
vmaUnmapMemory(m_allocator, static_cast<VmaAllocation>(mem_handle));
|
vmaUnmapMemory(m_allocator, static_cast<VmaAllocation>(mem_handle));
|
||||||
}
|
}
|
||||||
|
|
||||||
VkDeviceMemory get_vk_device_memory(mem_handle_t mem_handle)
|
VkDeviceMemory get_vk_device_memory(mem_handle_t mem_handle) override
|
||||||
{
|
{
|
||||||
VmaAllocationInfo alloc_info;
|
VmaAllocationInfo alloc_info;
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ namespace vk
|
||||||
return alloc_info.deviceMemory;
|
return alloc_info.deviceMemory;
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 get_vk_device_memory_offset(mem_handle_t mem_handle)
|
u64 get_vk_device_memory_offset(mem_handle_t mem_handle) override
|
||||||
{
|
{
|
||||||
VmaAllocationInfo alloc_info;
|
VmaAllocationInfo alloc_info;
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ namespace vk
|
||||||
return (VkDeviceMemory)mem_handle;
|
return (VkDeviceMemory)mem_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 get_vk_device_memory_offset(mem_handle_t /*mem_handle*/)
|
u64 get_vk_device_memory_offset(mem_handle_t /*mem_handle*/) override
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1476,7 +1476,7 @@ public:
|
||||||
swapchain_images[index].second->do_dma_transfer(cmd);
|
swapchain_images[index].second->do_dma_transfer(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
VkImage& get_image(u32 index)
|
VkImage& get_image(u32 index) override
|
||||||
{
|
{
|
||||||
return (VkImage&)(*swapchain_images[index].second.get());
|
return (VkImage&)(*swapchain_images[index].second.get());
|
||||||
}
|
}
|
||||||
|
@ -1720,7 +1720,7 @@ public:
|
||||||
return queuePresentKHR(vk_present_queue, &present);
|
return queuePresentKHR(vk_present_queue, &present);
|
||||||
}
|
}
|
||||||
|
|
||||||
VkImage& get_image(u32 index)
|
VkImage& get_image(u32 index) override
|
||||||
{
|
{
|
||||||
return (VkImage&)swapchain_images[index];
|
return (VkImage&)swapchain_images[index];
|
||||||
}
|
}
|
||||||
|
|
|
@ -677,7 +677,7 @@ namespace vk
|
||||||
m_ubo.unmap();
|
m_ubo.unmap();
|
||||||
}
|
}
|
||||||
|
|
||||||
void emit_geometry(vk::command_buffer &cmd)
|
void emit_geometry(vk::command_buffer &cmd) override
|
||||||
{
|
{
|
||||||
//Split into groups of 4
|
//Split into groups of 4
|
||||||
u32 first = 0;
|
u32 first = 0;
|
||||||
|
|
|
@ -107,20 +107,20 @@
|
||||||
<IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">true</IgnoreImportLibrary>
|
<IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">true</IgnoreImportLibrary>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<IncludePath>..\3rdparty\hidapi\hidapi;.\;..\;..\asmjit\src\asmjit;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include</IncludePath>
|
<IncludePath>..\3rdparty\hidapi\hidapi;.\;..\;..\asmjit\src;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include</IncludePath>
|
||||||
<LibraryPath>$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
<LibraryPath>$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">
|
||||||
<IncludePath>..\3rdparty\hidapi\hidapi;.\;..\;..\asmjit\src\asmjit;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include</IncludePath>
|
<IncludePath>..\3rdparty\hidapi\hidapi;.\;..\;..\asmjit\src;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include</IncludePath>
|
||||||
<LibraryPath>$(SolutionDir)lib\Debug-x64;$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
<LibraryPath>$(SolutionDir)lib\Debug-x64;$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<LibraryPath>$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
<LibraryPath>$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
||||||
<IncludePath>..\3rdparty\hidapi\hidapi;.\;..\;..\asmjit\src\asmjit;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include</IncludePath>
|
<IncludePath>..\3rdparty\hidapi\hidapi;.\;..\;..\asmjit\src;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">
|
||||||
<LibraryPath>$(SolutionDir)lib\Release-x64;$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
<LibraryPath>$(SolutionDir)lib\Release-x64;$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
||||||
<IncludePath>..\3rdparty\hidapi\hidapi;.\;..\;..\asmjit\src\asmjit;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include</IncludePath>
|
<IncludePath>..\3rdparty\hidapi\hidapi;.\;..\;..\asmjit\src;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<ImportGroup Label="PropertySheets" />
|
<ImportGroup Label="PropertySheets" />
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<IncludePath>.\;..\;..\asmjit\src\asmjit;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\hidapi\hidapi;..\3rdparty\Optional;..\3rdparty\xxhash</IncludePath>
|
<IncludePath>.\;..\;..\asmjit\src;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\hidapi\hidapi;..\3rdparty\Optional;..\3rdparty\xxhash</IncludePath>
|
||||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||||
<LibraryPath>$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
<LibraryPath>$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
||||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue