mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 12:05:23 +00:00
changes after review
This commit is contained in:
parent
4db7a8611e
commit
cb64e3e676
4 changed files with 46 additions and 22 deletions
10
3rdparty/llvm/CMakeLists.txt
vendored
10
3rdparty/llvm/CMakeLists.txt
vendored
|
@ -17,8 +17,10 @@ if(WITH_LLVM)
|
|||
option(LLVM_CCACHE_BUILD OFF)
|
||||
set(LLVM_ENABLE_WARNINGS OFF CACHE BOOL "Enable compiler warnings.")
|
||||
|
||||
# For non arm64 windows
|
||||
if(WIN32 AND (COMPILER_X86 OR (MSVC AND NOT COMPILER_ARM)))
|
||||
# For Windows x86 (not Windows AArch64).
|
||||
# Check on MSVC is needed due to COMPILER_X86, COMPILER_ARM etc. are not set/supported by the MSVC compiler, if used.
|
||||
# Furthermore, the MSVC compiler is not available/supported on Windows AArch64
|
||||
if(WIN32 AND (COMPILER_X86 OR MSVC))
|
||||
set(LLVM_USE_INTEL_JITEVENTS ON)
|
||||
endif()
|
||||
|
||||
|
@ -71,10 +73,10 @@ if(WITH_LLVM)
|
|||
set(LLVM_TARGETS_TO_BUILD "X86" CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
|
||||
endif()
|
||||
endif()
|
||||
if((WIN32 AND BUILD_LLVM) OR (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND COMPILER_X86))
|
||||
if(LLVM_USE_INTEL_JITEVENTS)
|
||||
list (APPEND LLVM_ADDITIONAL_LIBS IntelJITEvents)
|
||||
endif()
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
if(LLVM_USE_PERF)
|
||||
list (APPEND LLVM_ADDITIONAL_LIBS PerfJITEvents)
|
||||
endif()
|
||||
llvm_map_components_to_libnames(LLVM_LIBS
|
||||
|
|
37
BUILDING.md
37
BUILDING.md
|
@ -22,8 +22,7 @@ The following tools are required to build RPCS3 on Windows 10 or later:
|
|||
- [Qt 6.7.3](https://www.qt.io/download-qt-installer)
|
||||
- [Vulkan SDK 1.3.268.0](https://vulkan.lunarg.com/sdk/home) (see "Install the SDK" [here](https://vulkan.lunarg.com/doc/sdk/latest/windows/getting_started.html)) for now future SDKs don't work. You need precisely 1.3.268.0.
|
||||
|
||||
The `sln` solution available only on **Visual Studio** is the preferred building solution. It allows to build the **RPCS3** application in `Release` and `Debug` mode
|
||||
while the `CMake` solution is currently limited to `Debug` mode only.
|
||||
The `sln` solution available only on **Visual Studio** is the preferred building solution. It easily allows to build the **RPCS3** application in `Release` and `Debug` mode.
|
||||
|
||||
In order to build **RPCS3** with the `sln` solution (with **Visual Studio**), **Qt** libs need to be detected. To detect the libs:
|
||||
- add and set the `QTDIR` environment variable, e.g. `<QtInstallFolder>\6.7.3\msvc2019_64\`
|
||||
|
@ -132,14 +131,21 @@ You may want to download the precompiled [LLVM libs](https://github.com/RPCS3/ll
|
|||
as well as download and extract the [additional libs](https://github.com/RPCS3/glslang/releases/latest/download/glslanglibs_mt.7z) to `lib\%CONFIGURATION%-x64\` to speed up compilation
|
||||
time (unoptimised/debug libs are currently not available precompiled).
|
||||
|
||||
If you're not using the precompiled libs, build the following projects in `__BUILD_BEFORE` folder by right-clicking on a project and then click on `Build`:
|
||||
- `glslang`
|
||||
- either `llvm_build`
|
||||
- or `llvm_build_clang_cl`
|
||||
If you're not using the precompiled libs, those dependency libs need to be compiled first. From the `Solution Explorer` panel:
|
||||
1) expand `__BUILD_BEFORE`
|
||||
2) from the `Solution Configurations` drop-down menu, select `Release` (select `Debug` if you want to build in `Debug` mode)
|
||||
3) one after another, right-click on the following projects and then click on `Build` to build the selected lib:
|
||||
- `glslang`
|
||||
- either `llvm_build`
|
||||
- or `llvm_build_clang_cl` (if you installed **clang** on VS)
|
||||
|
||||
Afterwards:
|
||||
In order to build the **RPCS3** application:
|
||||
1) from the `Solution Configurations` drop-down menu, select `Release` (select `Debug` if you want to build in `Debug` mode)
|
||||
|
||||
`Build > Build Solution`
|
||||
**NOTE:** In case you previously compiled the dependency libs under `__BUILD_BEFORE`, you have also to select the same build configuration (e.g. `Release`, if you compiled the dependency libs in `Release` mode)
|
||||
|
||||
2) click on `Build` menu and then on `Build Solution`
|
||||
3) once the build is completed, the **RPCS3** application will be available under the `<rpcs3_root>\bin` folder
|
||||
|
||||
#### Building with Visual Studio CMake solution
|
||||
|
||||
|
@ -147,21 +153,22 @@ Start **Visual Studio**, click on `Open a local folder` and select the RPCS3's r
|
|||
|
||||
Once the project is open on VS, from the `Solution Explorer` panel:
|
||||
1) right-click on `rpcs3` and then click on `Switch to CMake Targets View`
|
||||
2) from the `Configuration` drop-down menu select `Windows x64`
|
||||
2) from the `Configuration` drop-down menu, select `msvc-release` (select `msvc-debug` if you want to build in `Debug` mode)
|
||||
3) right-click on `CMakeLists.txt Project` and then click on `Configure Cache`
|
||||
4) once the cache is created, the `rpcs3 project` will be available
|
||||
5) right-click on `rpcs3 Project` and then click on `Build All`
|
||||
5) right-click on `rpcs3 Project` and then click on `Build All` (or click on `Build` menu and then on `Build All`)
|
||||
6) once the build is completed, the **RPCS3** application will be available under the `<rpcs3_root>\build-msvc\bin` folder
|
||||
|
||||
#### Building with standalone CMake tool
|
||||
|
||||
In case you preferred to install and use the standalone **CMake** tool:
|
||||
1) move on the RPCS3's root folder
|
||||
2) execute the following commands to create the cache and to build the application, respectively:
|
||||
```
|
||||
cmake --preset msvc
|
||||
cmake --build build-msvc
|
||||
```
|
||||
2) execute the following commands to create the cache and to build the application (for the build, use `--preset msvc-debug` if you want to build in `Debug` mode), respectively:
|
||||
|
||||
```
|
||||
cmake --preset msvc
|
||||
cmake --build --preset msvc-release
|
||||
```
|
||||
3) once the build is completed, the **RPCS3** application will be available under the `<rpcs3_root>\build-msvc\bin` folder
|
||||
|
||||
### Linux
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
"strategy": "external"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_CONFIGURATION_TYPES": "Debug;Release",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
|
||||
"USE_FAUDIO": "OFF",
|
||||
"USE_PRECOMPILED_HEADERS": "ON",
|
||||
|
@ -67,5 +67,17 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "msvc-debug",
|
||||
"configurePreset": "msvc",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "msvc-release",
|
||||
"configurePreset": "msvc",
|
||||
"configuration": "Release"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -152,10 +152,13 @@ elseif(UNIX)
|
|||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${CMAKE_SOURCE_DIR}/bin/git $<TARGET_FILE_DIR:rpcs3>/git)
|
||||
elseif(WIN32)
|
||||
if(MSVC)
|
||||
add_custom_command(TARGET rpcs3 POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${PROJECT_BINARY_DIR}/3rdparty/OpenAL/openal-soft/$<CONFIG>/OpenAL32.dll" "$<TARGET_FILE_DIR:rpcs3>"
|
||||
COMMAND "${CMAKE_COMMAND}" -E remove "${CMAKE_SOURCE_DIR}/bin/rpcs3.exe")
|
||||
endif()
|
||||
add_custom_command(TARGET rpcs3 POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E remove "${CMAKE_SOURCE_DIR}/bin/rpcs3.exe"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_SOURCE_DIR}/bin" "$<TARGET_FILE_DIR:rpcs3>"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${PROJECT_BINARY_DIR}/3rdparty/OpenAL/openal-soft/Debug/OpenAL32.dll" "$<TARGET_FILE_DIR:rpcs3>"
|
||||
COMMAND "${WINDEPLOYQT_EXECUTABLE}" --no-compiler-runtime --no-opengl-sw --no-patchqt --no-translations --no-quick --no-system-d3d-compiler --no-quick-import --plugindir "$<IF:$<CXX_COMPILER_ID:MSVC>,$<TARGET_FILE_DIR:rpcs3>/plugins,$<TARGET_FILE_DIR:rpcs3>/share/qt6/plugins>" --verbose 0 "$<TARGET_FILE:rpcs3>")
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue