Skip to content

Commit

Permalink
Update build instructions
Browse files Browse the repository at this point in the history
Fix wxWidgets build instructions to target 10.15 (needed for filesystem C++17 features) and add other release options
  • Loading branch information
Blake-Madden committed Nov 29, 2024
1 parent ba1b7dc commit 5a7a34d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,15 @@ cd ..
git clone https://github.com/wxWidgets/wxWidgets.git --recurse-submodules
cd wxWidgets
cmake . -DCMAKE_INSTALL_PREFIX=./wxlib -DwxBUILD_SHARED=OFF \
-D"CMAKE_OSX_ARCHITECTURES:STRING=arm64;x86_64" -DCMAKE_BUILD_TYPE=Release
cmake --build . --target install -j $(nproc) --config Release
-D"CMAKE_OSX_ARCHITECTURES:STRING=arm64;x86_64" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
-DwxBUILD_OPTIMISE=ON -DwxBUILD_STRIPPED_RELEASE=ON \
-DCMAKE_BUILD_TYPE=Release
cmake --build . --target install --config Release
cd ..
cd Cuneiform/gui
cmake . -DCMAKE_BUILD_TYPE=Release
cmake --build . --target all -j $(nproc) --config Release
cmake --build . --target all --config Release
```

On Windows with Visual Studio, build wxWidgets with the defaults, except `wxBUILD_SHARED` should be set to "OFF"
Expand Down
11 changes: 7 additions & 4 deletions docs/manual/building.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,25 @@ After building, "cuneiform" will be available in the "bin" folder.
Download [wxWidgets](https://github.com/wxWidgets/wxWidgets), placing it at the same folder level as this project.
After building *wxWidgets*, *Cuneiform* can be configured and built with *Cmake*.

On Unix:
On Linux/macOS:

``` {.bash filename="Terminal"}
# download and build wxWidgets one folder above
cd ..
git clone https://github.com/wxWidgets/wxWidgets.git --recurse-submodules
cd wxWidgets
cmake . -DCMAKE_INSTALL_PREFIX=./wxlib -DwxBUILD_SHARED=OFF \
-D"CMAKE_OSX_ARCHITECTURES:STRING=arm64;x86_64" -DCMAKE_BUILD_TYPE=Release
cmake --build . --target install -j $(nproc) --config Release
-D"CMAKE_OSX_ARCHITECTURES:STRING=arm64;x86_64" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
-DwxBUILD_OPTIMISE=ON -DwxBUILD_STRIPPED_RELEASE=ON \
-DCMAKE_BUILD_TYPE=Release
cmake --build . --target install --config Release

# go back into the project folder and build the GUI version
cd ..
cd Cuneiform/gui
cmake . -DCMAKE_BUILD_TYPE=Release
cmake --build . --target all -j $(nproc) --config Release
cmake --build . --target all --config Release
```

::: {.notesection data-latex=""}
Expand Down
1 change: 1 addition & 0 deletions gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ elseif(APPLE)
$<$<CONFIG:Debug>:-Og>
$<$<CONFIG:Release>:-O2>)
elseif(UNIX)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
target_compile_definitions(${PROJECT_NAME} PUBLIC __WXGTK__
$<$<CONFIG:Debug>:__WXDEBUG__> $<$<CONFIG:Release>:NDEBUG>)
target_compile_options(${PROJECT_NAME} PUBLIC -Wall -Wextra -Wpedantic -Wshadow -Werror
Expand Down

0 comments on commit 5a7a34d

Please sign in to comment.