Skip to content

Commit 452ebc6

Browse files
committed
Update README.md
1 parent c2ea475 commit 452ebc6

File tree

3 files changed

+33
-11
lines changed

3 files changed

+33
-11
lines changed

README.md

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,20 +78,40 @@ Compatible means it is capable of playing discs.
7878

7979
## How to build
8080

81-
You need a compiler that supports C++20 and wxWidgets 3.1.
81+
You need a compiler that supports C++23 and wxWidgets 3.2.
82+
83+
When cloning the repo, make sure you clone the submodules too (`git clone --recurse-submodules https://github.com/Stovent/CeDImu`).
8284

8385
### Build macros
8486

85-
`ENABLE_LOG`: if defined, allows the library to print some messages in the console and the use of OnLogMemoryAccess callback (default: `OFF`).
87+
CeDImu (the frontend) and libCeDImu (the emulation core) accepts the following macros:
88+
89+
`LIBCEDIMU_ENABLE_LOG`: if defined, allows the library to print some messages in the console and the use of OnLogMemoryAccess callback.
8690

87-
The official build of CeDImu always enables it.
91+
`LIBCEDIMU_ENABLE_RENDERERSIMD`: if on, uses the hardware-accelerated SIMD renderer. Requires the C++ header `<experimental/simd>`.
8892

8993
### CMake
9094

9195
#### CMake options
9296

97+
The CMake options below controls how to build CeDImu and the build macros listed upper.
98+
99+
`LIBCEDIMU_ENABLE_LOG`: see section `Build macros` (default: `ON`). The official build of CeDImu always enables it.
100+
101+
`LIBCEDIMU_ENABLE_RENDERERSIMD`: builds and uses the SIMD renderer, see section `Build macros` (default: `OFF`).
102+
103+
`LIBCEDIMU_PROFILE_GNU`: if true, adds profiling arguments to GCC (clang/MSVC not supported) (default: `OFF`).
104+
105+
`LIBCEDIMU_ENABLE_ASAN`: if true, uses address sanitizer for GCC and clang (MSVC not yet supported) (default: `OFF`).
106+
93107
`CEDIMU_BUILD_CDITOOL`: If ON, builds the little `cditool` program (Linux only, requires libcdio) (default: `OFF`).
94108

109+
`CEDIMU_BENCHMARKS`: if ON, builds the benchmarks (default: `OFF`).
110+
111+
`CEDIMU_TESTS`: If ON, builds the unit tests (requires Catch2 cloned) (default: `ON`).
112+
113+
`CEDIMU_TESTS_ASAN`: If ON, builds the unit tests with address sanitizer options (default: `OFF`).
114+
95115
`CEDIMU_ENABLE_LTO`: If ON, compiles the executable with link-time optimisations (default: `ON`).
96116

97117
#### Windows
@@ -118,7 +138,7 @@ First install cmake and wxWidgets-3.1 (or later).
118138

119139
With apt the command is: `sudo apt install cmake libwxgtk3.2-dev`
120140

121-
Install the dependency, then open a terminal in the root directory of the git and type:
141+
Install the dependency, then open a terminal in the root directory of the repo and type:
122142

123143
```sh
124144
cmake -B build -DCMAKE_BUILD_TYPE=Release
@@ -129,16 +149,18 @@ The executable will be in the `build` directory.
129149

130150
#### macOS
131151

132-
Package dependency: `wxwidgets` and `cmake` (e.g. if using brew run: `brew install wxwidgets cmake`). Also make sure to have Xcode or just it's Command Line Tools installed.
152+
Package dependency: `wxwidgets`, `cmake` and `llvm` (e.g. if using brew run: `brew install wxwidgets cmake llvm`). Also make sure to have Xcode or just it's Command Line Tools installed.
153+
154+
LLVM clang is used to build because AppleClang lacks recent features.
133155

134156
For keyboard input to work properly, enable 'Keyboard Navigation' in macOS. See this [support article](https://support.apple.com/en-us/HT204434#fullkeyboard).
135157

136-
Open a terminal in the root directory of the git and type:
158+
Open a terminal in the root directory of the repo and type:
137159

138160
```sh
139161
mkdir build
140162
cd build
141-
cmake .. -DCMAKE_BUILD_TYPE=Release
163+
CXX=$(brew --prefix llvm)/bin/clang++ cmake .. -DCMAKE_BUILD_TYPE=Release
142164
make -j$(sysctl -n hw.physicalcpu)
143165
```
144166

src/CDI/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ add_subdirectory(HLE)
4343
add_subdirectory(OS9)
4444
add_subdirectory(Video)
4545

46-
option(LIBCEDIMU_ENABLE_LOG "Allows the library to print some messages in the console and the use of OnLogMemoryAccess callback" OFF)
46+
option(LIBCEDIMU_ENABLE_LOG "Allows the library to print some messages in the console and the use of OnLogMemoryAccess callback" ON)
4747
if(LIBCEDIMU_ENABLE_LOG)
48-
target_compile_definitions(CeDImu PUBLIC ENABLE_LOG)
48+
target_compile_definitions(CeDImu PUBLIC LIBCEDIMU_ENABLE_LOG)
4949
endif()
5050

5151
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") # Common flags for GCC and Clang.

src/CDI/common/Callbacks.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
#include <functional>
99
#include <mutex>
1010

11-
#ifdef ENABLE_LOG
11+
#ifdef LIBCEDIMU_ENABLE_LOG
1212
#define LOG(content) content
1313
#else
1414
#define LOG(content)
15-
#endif // ENABLE_LOG
15+
#endif // LIBCEDIMU_ENABLE_LOG
1616

1717
struct LogInstruction
1818
{

0 commit comments

Comments
 (0)