Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove legacy subsystem code #1550

Merged
merged 68 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
27b05b4
renderer: Deprecate old renderer code.
heinezen Sep 22, 2023
96d08f5
renderer: Remove legacy renderer.
heinezen Sep 22, 2023
4f8e4e6
renderer: Remove legacy asset management.
heinezen Sep 22, 2023
c3c4a22
assets: Remove old asset management entirely.
heinezen Sep 22, 2023
ec0d748
presenter: Remove legacy game control.
heinezen Sep 22, 2023
3cea703
presenter: Remove legacy display code.
heinezen Sep 22, 2023
5236d44
renderer: Remove old texture code.
heinezen Sep 22, 2023
59caca9
renderer: Remove most of the old draw code.
heinezen Sep 23, 2023
44cf90e
renderer: Remove legacy signal handling for drawing/inputs.
heinezen Sep 23, 2023
bbf1b56
input: Remove legacy input system.
heinezen Sep 23, 2023
17959b3
renderer: Remove old shader code.
heinezen Sep 23, 2023
e5ed4a0
refactor: Move OpenGL error checks into renderer.
heinezen Sep 23, 2023
485cfde
refactor: Move old screenshot manager into renderer.
heinezen Sep 23, 2023
986b3e0
renderer: Rewrite screenshot manager for new renderer.
heinezen Sep 23, 2023
99078f3
engine: Remove legacy engine integration.
heinezen Sep 23, 2023
c1d4741
gamestate: Remove legacy gamestate.
heinezen Sep 23, 2023
1b6224e
gamedata: Remove old dummy data.
heinezen Sep 23, 2023
32e968f
coord: Remove deprecated conversions and types.
heinezen Sep 23, 2023
66b317e
refactor: Remove nyan directory.
heinezen Sep 23, 2023
ab404ca
refactor: Remove SDL from remaining engine code.
heinezen Sep 23, 2023
931a672
audio: Port audio manager to Qt6.
heinezen Sep 24, 2023
ada257f
buildsys: Add QtMultimedia dependency.
heinezen Sep 24, 2023
4faf717
renderer: Fix clang build not compiling.
heinezen Sep 24, 2023
c557ff0
gui: Remove SDL2 from classes.
heinezen Sep 24, 2023
1899b16
buildsys: Remove SDL2 from dependencies.
heinezen Sep 24, 2023
475143e
ci: Use Github Actions checkout v4.
heinezen Sep 24, 2023
c7f3d70
ci: Update cached Windows dependencies.
heinezen Sep 25, 2023
dbe3c30
gui: Remove BlendPreserver object.
heinezen Sep 27, 2023
9af686f
gui: Fix missing return value.
heinezen Sep 27, 2023
351a6d7
Add clang-tidy recommendations.
heinezen Oct 22, 2023
99d8043
gui: Tranfer remaining GUI classes to renderer.
heinezen Nov 1, 2023
eaeb1f8
renderer: Organize terrain into chunks.
heinezen Nov 5, 2023
330f40e
gamestate: Terrain chunks.
heinezen Nov 5, 2023
542ec29
gamestate: Move terrain render updates to terrain chunk.
heinezen Nov 5, 2023
c1e73d0
renderer: Render individual terrain chunks.
heinezen Nov 5, 2023
ac89eac
terrain: Change chunk offsets to scene coordinate types.
heinezen Nov 5, 2023
bd554c8
gamestate: Use terrain texture from modpacks is available.
heinezen Nov 5, 2023
045c593
assets: Use float values for scalefactor.
heinezen Nov 6, 2023
7fd1a6e
convert: Export .terrain definitions.
heinezen Nov 6, 2023
46acfce
gamestate: Fix getting terrain path from modpack.
heinezen Nov 6, 2023
cb669af
input: Fix error when selection callback is missing.
heinezen Nov 6, 2023
83b16da
gui: Remove remaining mentions of SDL.
heinezen Nov 6, 2023
9d6a038
engine: Fix capture of argument in thread function.
heinezen Nov 7, 2023
eb84b4c
renderer: Use correct world space transformation for terrain model.
heinezen Nov 10, 2023
fd7f28a
doc: Update run instructions.
heinezen Nov 10, 2023
e1eee5e
gamestate: Terrain tile definition.
heinezen Nov 11, 2023
1f7ea14
gamestate: Replace terrain height map with tiles.
heinezen Nov 11, 2023
520ca99
terrain: Remove old terrain code.
heinezen Nov 11, 2023
1718b67
util: Remove CSV reader.
heinezen Nov 11, 2023
040ead8
renderer: Remove unused animation class.
heinezen Nov 11, 2023
0462af2
Fix CI complaints.
heinezen Nov 11, 2023
547a5f2
Fix clang complaints.
heinezen Nov 11, 2023
5f0865e
util: Make type hint Python 3.9 compliant.
heinezen Nov 11, 2023
252076e
console: Fix comment formatting.
heinezen Dec 13, 2023
7b2b1fe
buildsys: Remove obsolte comment.
heinezen Dec 13, 2023
be76f54
gamestate: Fix comment about static test entities.
heinezen Dec 13, 2023
7f4706e
gamestate: Pass game entity ptr by reference.
heinezen Dec 13, 2023
892ceb7
gamestate: Make 'Player' moveable.
heinezen Dec 13, 2023
9d4c3ba
gamestate: Pass terrain chunk by reference.
heinezen Dec 13, 2023
d635189
gamestate: Fix missing std::move.
heinezen Dec 13, 2023
8d779ed
input: Pass controllers by reference.
heinezen Dec 13, 2023
0e70ea8
pathing: Remove obsolete method.
heinezen Dec 13, 2023
21cffdb
gui: Remove obsolete method.
heinezen Dec 13, 2023
11075b0
renderer: Remove specific command hint.
heinezen Dec 13, 2023
ca35303
renderer: Remove reinterpret cast from memcpy operations.
heinezen Dec 13, 2023
5ae997b
util: Remove obsolete classes.
heinezen Dec 13, 2023
d07c460
renderer: Comment out currently unused param.
heinezen Dec 13, 2023
10bc91d
fix comment indent with tabs.
heinezen Dec 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/macosx-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Install environment helpers with homebrew
run: brew install ccache
- name: Install dependencies with homebrew
run: brew install libepoxy freetype fontconfig harfbuzz sdl2 sdl2_image opus opusfile qt6 libogg libpng toml11 eigen
run: brew install libepoxy freetype fontconfig harfbuzz opus opusfile qt6 libogg libpng toml11 eigen
- name: Install nyan dependencies with homebrew
run: brew install flex make
- name: Install python3 packages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-22.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: mkdir -p /tmp/image
shell: bash
- name: Download devenv image
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: devenv-image-compressed.tar.gz
path: '/tmp/image'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-server-2019.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
mkdir download
cd download
$zipfile = "openage-dep-x64-windows.zip"
Invoke-WebRequest https://github.com/SFTtech/openage-dependencies/releases/download/v0.5.0/openage-dep-x64-windows.zip -OutFile $zipfile
Invoke-WebRequest https://github.com/SFTtech/openage-dependencies/releases/download/v0.5.1/openage-dep-x64-windows.zip -OutFile $zipfile
Expand-Archive -Path $zipfile -DestinationPath . -Force
Remove-Item $zipfile
(Get-ChildItem . -Recurse -File).FullName
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-server-2022.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
mkdir download
cd download
$zipfile = "openage-dep-x64-windows.zip"
Invoke-WebRequest https://github.com/SFTtech/openage-dependencies/releases/download/v0.5.0/openage-dep-x64-windows.zip -OutFile $zipfile
Invoke-WebRequest https://github.com/SFTtech/openage-dependencies/releases/download/v0.5.1/openage-dep-x64-windows.zip -OutFile $zipfile
Expand-Archive -Path $zipfile -DestinationPath . -Force
Remove-Item $zipfile
(Get-ChildItem . -Recurse -File).FullName
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Quickstart
```

* **I compiled everything. Now how do I run it?**
* Execute `./bin/run`.
* Execute `cd bin && ./run main`.
* [The convert script](/doc/media_convert.md) will transform original assets into openage formats, which are a lot saner and more moddable.
* Use your brain and react to the things you'll see.

Expand Down
2 changes: 1 addition & 1 deletion assets/test/textures/test_animation.sprite
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version 2

texture 0 "test_texture.texture"

scalefactor 1
scalefactor 1.0

layer 0 mode=loop position=20 time_per_frame=0.125

Expand Down
2 changes: 1 addition & 1 deletion assets/test/textures/test_missing.sprite
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version 2

texture 0 "test_missing.texture"

scalefactor 1
scalefactor 1.0

layer 0 mode=once

Expand Down
2 changes: 1 addition & 1 deletion assets/test/textures/test_terrain.terrain
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version 2

texture 0 "test_terrain.texture"

scalefactor 1
scalefactor 1.0

layer 0

Expand Down
29 changes: 0 additions & 29 deletions buildsystem/modules/FindSDL2Image.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion doc/build_instructions/arch_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This command should provide required packages from the Arch Linux repositories:

`sudo pacman -S --needed eigen python python-mako python-pillow python-numpy python-lz4 python-pygments cython libepoxy libogg libpng ttf-dejavu freetype2 fontconfig harfbuzz cmake sdl2 sdl2_image opusfile opus python-pylint python-toml qt6-declarative`
`sudo pacman -S --needed eigen python python-mako python-pillow python-numpy python-lz4 python-pygments cython libepoxy libogg libpng ttf-dejavu freetype2 fontconfig harfbuzz cmake opusfile opus python-pylint python-toml qt6-declarative qt6-multimedia`

Additionally, you have to install [`toml11`](https://aur.archlinux.org/packages/toml11) from the AUR.
If you have `yay`, you can run this command:
Expand Down
2 changes: 1 addition & 1 deletion doc/build_instructions/debian.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Prerequisite steps for Debian users

- `sudo apt-get update`
- `sudo apt-get install cmake cython3 libeigen3-dev libepoxy-dev libfontconfig1-dev libfreetype-dev libharfbuzz-dev libogg-dev libopus-dev libopusfile-dev libpng-dev libsdl2-dev libsdl2-image-dev libtoml11-dev python3-dev python3-mako python3-numpy python3-lz4 python3-pil python3-pip python3-pygments python3-toml qml6-module-qtquick-controls qt6-declarative-dev`
- `sudo apt-get install cmake cython3 libeigen3-dev libepoxy-dev libfontconfig1-dev libfreetype-dev libharfbuzz-dev libogg-dev libopus-dev libopusfile-dev libpng-dev libtoml11-dev python3-dev python3-mako python3-numpy python3-lz4 python3-pil python3-pip python3-pygments python3-toml qml6-module-qtquick-controls qt6-declarative-dev qt6-multimedia-dev qml6-module-qtquick3d-spatialaudio`

You will also need [nyan](https://github.com/SFTtech/nyan/blob/master/doc/building.md) and its dependencies.
2 changes: 1 addition & 1 deletion doc/build_instructions/fedora.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

Run the following command:

`sudo dnf install clang cmake eigen3-devel fontconfig-devel gcc-c harfbuzz-devel libepoxy-devel libogg-devel libopusenc-devel libpng-devel opusfile-devel python3-Cython python3-devel python3-mako python3-numpy python3-lz4 python3-pillow python3-pygments python3-toml SDL2-devel SDL2_image-devel++ toml11-devel qt6-qtdeclarative-devel`
`sudo dnf install clang cmake eigen3-devel fontconfig-devel gcc-c harfbuzz-devel libepoxy-devel libogg-devel libopusenc-devel libpng-devel opusfile-devel python3-Cython python3-devel python3-mako python3-numpy python3-lz4 python3-pillow python3-pygments python3-toml toml11-devel qt6-qtdeclarative-devel qt6-qtmultimedia-devel`

You will also need [nyan](https://github.com/SFTtech/nyan/blob/master/doc/building.md) and its dependencies.
2 changes: 1 addition & 1 deletion doc/build_instructions/freebsd.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This command should provide required packages for FreeBSD installation:

`sudo pkg install cmake cython eigen3 harfbuzz opus-tools opusfile png py-mako py-numpy py-lz4 py-pillow py-pygments py-toml pylint python qt6 sdl2 sdl2_image toml11`
`sudo pkg install cmake cython eigen3 harfbuzz opus-tools opusfile png py-mako py-numpy py-lz4 py-pillow py-pygments py-toml pylint python qt6 toml11`

You will also need [nyan](https://github.com/SFTtech/nyan/blob/master/doc/building.md) and its dependencies.

Expand Down
2 changes: 1 addition & 1 deletion doc/build_instructions/macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
brew update-reset && brew update
brew tap homebrew/cask-fonts
brew install font-dejavu
brew install cmake python3 libepoxy freetype fontconfig harfbuzz sdl2 sdl2_image opus opusfile qt6 libogg libpng toml11 eigen
brew install cmake python3 libepoxy freetype fontconfig harfbuzz opus opusfile qt6 libogg libpng toml11 eigen
brew install llvm
pip3 install cython numpy mako lz4 pillow pygments toml

Expand Down
2 changes: 1 addition & 1 deletion doc/build_instructions/opensuse.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Prerequisite steps for openSUSE users

- `zypper install --no-recommends cmake doxygen eigen3-devel fontconfig-devel gcc-c graphviz++ harfbuzz-devel libSDL2-devel libSDL2_image-devel libepoxy-devel libfreetype-dev libogg-devel libopus-devel libpng-devel libtoml11-dev libqt6-qtdeclarative-devel libqt6-qtquickcontrols opusfile-devel python3-Cython python3-Mako python3-lz4 python3-Pillow python3-Pygments python3-toml python3-devel`
- `zypper install --no-recommends cmake doxygen eigen3-devel fontconfig-devel gcc-c graphviz++ harfbuzz-devel libepoxy-devel libfreetype-dev libogg-devel libopus-devel libpng-devel libtoml11-dev qt6-declarative-dev qt6-quickcontrols2 qt6-multimedia-dev opusfile-devel python3-Cython python3-Mako python3-lz4 python3-Pillow python3-Pygments python3-toml python3-devel`

You will also need [nyan](https://github.com/SFTtech/nyan/blob/master/doc/building.md) and its dependencies.
2 changes: 1 addition & 1 deletion doc/build_instructions/ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Run the following commands:

- `sudo apt-get update`
- `sudo apt-get install g++ cmake cython3 libeigen3-dev libepoxy-dev libfontconfig1-dev libfreetype-dev libharfbuzz-dev libogg-dev libopus-dev libopusfile-dev libpng-dev libsdl2-dev libsdl2-image-dev libtoml11-dev python3-dev python3-mako python3-numpy python3-lz4 python3-pil python3-pip python3-pygments python3-toml qml6-module-qtquick-controls qt6-declarative-dev`
- `sudo apt-get install g++ cmake cython3 libeigen3-dev libepoxy-dev libfontconfig1-dev libfreetype-dev libharfbuzz-dev libogg-dev libopus-dev libopusfile-dev libpng-dev libtoml11-dev python3-dev python3-mako python3-numpy python3-lz4 python3-pil python3-pip python3-pygments python3-toml qml6-module-qtquick-controls qt6-declarative-dev qt6-multimedia-dev qml6-module-qtquick3d-spatialaudio`

You will also need [nyan](https://github.com/SFTtech/nyan/blob/master/doc/building.md) and its dependencies.

Expand Down
2 changes: 1 addition & 1 deletion doc/build_instructions/windows_msvc.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ _Note:_ Also ensure that `python` and `python3` both point to the correct and th
### vcpkg packages
Set up [vcpkg](https://github.com/Microsoft/vcpkg#quick-start). Open a command prompt at `<vcpkg directory>`

vcpkg install dirent eigen3 fontconfig freetype harfbuzz libepoxy libogg libpng opus opusfile qtbase qtdeclarative sdl2 sdl2-image toml11
vcpkg install dirent eigen3 fontconfig freetype harfbuzz libepoxy libogg libpng opus opusfile qtbase qtdeclarative qtmultimedia toml11

_Note:_ The `qt6` port in vcpkg has been split into multiple packages, build times are acceptable now.
If you want, you can still use [the prebuilt version](https://www.qt.io/download-open-source/) instead.
Expand Down
8 changes: 3 additions & 5 deletions doc/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,13 @@ Dependency list:
CR nyan (https://github.com/SFTtech/nyan)
CR O ncurses
C mako
CR sdl2
CR sdl2_image
CR opusfile
CRA opus
CRA ogg
S pycodestyle
C pygments
S pylint
CR qt6 >=6.2 (Core, Quick, QuickControls modules)
CR qt6 >=6.2 (Core, Quick, QuickControls, Multimedia modules)
CR toml11
CR O vulkan

Expand Down Expand Up @@ -167,10 +165,10 @@ The reference package is [created for Gentoo](https://github.com/SFTtech/gentoo-

- I wanna see compiler invocations
- `make VERBOSE=1`
- My `SDL2_Image`/`Python`/whatever is installed somewhere, but `cmake` can't find it!
- My `Qt`/`Python`/whatever is installed somewhere, but `cmake` can't find it!
- Run `ccmake` or `cmake-gui` in the build directory to see and change config variables.
- You can manually tell `cmake` where to look. Try something along the lines of
- `./configure -- -DSDL2IMAGE_INCLUDE_DIRS=/whereever/sdl2_image/include/`
- `./configure -- -DPYTHON_INCLUDE_DIRS=/whereever/python/include/`
- `-DPython3_EXECUTABLE=/your/py3/directory/`

- I get compiler errors about missing header files
Expand Down
12 changes: 6 additions & 6 deletions doc/code/gui.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ qmlRegisterType<ResourceAmountLink>("yay.sfttech.openage", 1, 0, "ResourceAmount

2. Specializations `struct Wrap<ResourceAmount>` and `struct Unwrap<ResourceAmountLink>` must be defined:
```cpp
namespace qtsdl {
namespace qtgui {
template<>
struct Wrap<ResourceAmount> {
using Type = ResourceAmountLink;
Expand All @@ -61,13 +61,13 @@ template<>
struct Unwrap<ResourceAmountLink> {
using Type = ResourceAmount;
};
} // namespace qtsdl
} // namespace qtgui
```

3. Also ResourceAmount needs a public member to be added:
```cpp
public:
qtsdl::GuiItemLink *gui_link
qtgui::GuiItemLink *gui_link
```

4. Declare and implement needed properties and signals in the `ResourceAmountLink` using Qt property syntax.
Expand All @@ -78,7 +78,7 @@ There is a class `GeneratorParameters` in `libopenage/` directory.
It has a big list of parameters of different types like `generation_seed`, `player_radius`, `player_names`, etc.
So, we're not going to write a Qt property for each one:

1. `GeneratorParameters` must derive from the `qtsdl::GuiPropertyMap`.
1. `GeneratorParameters` must derive from the `qtgui::GuiPropertyMap`.

2. `GeneratorParameters` should set its initial values like so:
```cpp
Expand All @@ -96,7 +96,7 @@ qmlRegisterType<GeneratorParametersLink>("yay.sfttech.openage", 1, 0, "Generator

4. Specializations `struct Wrap<GeneratorParameters>` and `struct Unwrap<GeneratorParametersLink>` must be defined:
```cpp
namespace qtsdl {
namespace qtgui {
template<>
struct Wrap<GeneratorParameters> {
using Type = GeneratorParametersLink;
Expand All @@ -106,7 +106,7 @@ template<>
struct Unwrap<GeneratorParametersLink> {
using Type = GeneratorParameters;
};
} // namespace qtsdl
} // namespace qtgui
```

That results into a `ListModel`-like QML type with `display` and `edit` roles.
Expand Down
9 changes: 6 additions & 3 deletions doc/code_style/mom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@
// The associated header file comes first!
#include "mom.h"

// System includes follow, sorted alphabetically
// C++ std library includes follow, sorted alphabetically
#include <cmath>
#include <cstdio>
#include <iostream>
#include <SDL/SDL.h>

// Local includes next, sorted alphabetically
// External libraries are next, sorted alphabetically
#include <eigen3/Eigen/Dense>
#include <epoxy/gl.h>

// Local includes come last, sorted alphabetically
#include "../valve.h"
#include "half_life.h"
#include "log/log.h"
Expand Down
15 changes: 0 additions & 15 deletions doc/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,3 @@ A workaround would be to make a backup of your AGE2 directory and let the conver
backup at subfolder `AGE2/resources` delete all files ***except*** folders. Another workaround would be to
backup your AGE2 folder and redownload it to have a clean install. After conversion you can replace
it with the backup.

## Installation

### Cannot specify compile definitions for target "SDL2::SDL2" which is not built by this project

This error is specific to a few operating systems. The main cause is that your SDL2 version is too old and does not
include the necessary CMake files defining the target. There is an indepth discussion about this
[here](https://discourse.libsdl.org/t/how-is-sdl2-supposed-to-be-used-with-cmake/31275/16).
As a solution, you should update your SDL packages to SDL >=2.0.12 or **compile the latest SDL2 and SDL2-image from
source**. The latest version includes the necessary CMake files to expose the `SDL2::SDL2` target.

## Building on Debian 12
On Debian you might get an error saying that it couldn't find SDL2 library. This happens because the CMAKE prefix and SDL2 path are not set correctly.
The solution is to append at the end of the `./configure` command the cmake variables for both the prefix and SDL2 path, like so:
`./configure <your configure opts> -- -DCMAKE_PREFIX_PATH=/usr -DSDL2_DIR=/usr/include/SDL2` (you can use `find` to look for the correct paths)
20 changes: 2 additions & 18 deletions libopenage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ find_library(FONTCONFIG_LIB fontconfig)
find_package(toml11 REQUIRED)
find_package(Freetype REQUIRED)
find_package(PNG REQUIRED)
find_package(SDL2 CONFIG REQUIRED)
target_compile_definitions(SDL2::SDL2 INTERFACE SDL_MAIN_HANDLED)
find_package(SDL2Image REQUIRED)
find_package(Opusfile REQUIRED)
find_package(Epoxy REQUIRED)
find_package(HarfBuzz 1.0.0 REQUIRED)
Expand All @@ -65,8 +62,7 @@ set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)

set(QT_VERSION_REQ "6.2")
find_package(Qt6Core ${QT_VERSION_REQ} REQUIRED)
find_package(Qt6Quick ${QT_VERSION_REQ} REQUIRED)
find_package(Qt6 ${QT_VERSION_REQ} REQUIRED COMPONENTS Core Quick Multimedia)

if(WANT_BACKTRACE)
find_package(GCCBacktrace)
Expand Down Expand Up @@ -268,7 +264,6 @@ target_include_directories(libopenage
${EPOXY_INCLUDE_DIRS}
${OPUS_INCLUDE_DIRS}
${PNG_INCLUDE_DIRS}
${SDL2IMAGE_INCLUDE_DIRS}
${HarfBuzz_INCLUDE_DIRS}
${QTPLATFORM_INCLUDE_DIRS}
)
Expand All @@ -292,14 +287,13 @@ target_link_libraries(libopenage
${FREETYPE_LIBRARIES}
${EPOXY_LIBRARIES}
${MATH_LIB}
${SDL2IMAGE_LIBRARIES}
SDL2::SDL2
${UTIL_LIB}
${HarfBuzz_LIBRARIES}
${RT_LIB}
${EXECINFO_LIB}
Qt6::Core
Qt6::Quick
Qt6::Multimedia
)

##################################################
Expand All @@ -322,19 +316,14 @@ get_codegen_scu_file()
# are specified above the source file list.

add_sources(libopenage
handlers.cpp
legacy_engine.cpp
main.cpp
options.cpp
screenshot.cpp
texture.cpp
${CMAKE_CURRENT_BINARY_DIR}/config.cpp
${CMAKE_CURRENT_BINARY_DIR}/version.cpp
${CODEGEN_SCU_FILE}
)

pxdgen(
legacy_engine.h
main.h
)

Expand All @@ -349,9 +338,7 @@ add_subdirectory("datastructure")
add_subdirectory("engine")
add_subdirectory("error")
add_subdirectory("event")
add_subdirectory("gamedata")
add_subdirectory("gamestate")
add_subdirectory("gui")
add_subdirectory("input")
add_subdirectory("job")
add_subdirectory("log")
Expand All @@ -361,10 +348,7 @@ add_subdirectory("presenter")
add_subdirectory("pyinterface")
add_subdirectory("renderer")
add_subdirectory("rng")
add_subdirectory("shader")
add_subdirectory("terrain")
add_subdirectory("testing")
add_subdirectory("time")
add_subdirectory("unit")
add_subdirectory("util")
add_subdirectory("versions")
2 changes: 0 additions & 2 deletions libopenage/assets/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
add_sources(libopenage
assetmanager.cpp
legacy_assetmanager.cpp
mod_manager.cpp
modpack.cpp
)
Loading
Loading