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

Add Meson to CMaNGOS #406

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Add Meson to CMaNGOS #406

wants to merge 15 commits into from

Conversation

insunaa
Copy link
Contributor

@insunaa insunaa commented Oct 9, 2022

🍰 Pullrequest

This PR adds the Meson Build System to CMaNGOS. Works great with Linux, OK with MacOS and barely works with Windows (but does work).
I seem to be the only one who sees value in this, so if nobody else can be convinced to switch to a simpler build system than CMake then close the PR again.

Todo / Checklist

  • Improve Windows Support

image

@killerwife
Copy link
Contributor

As you said it, barely works on windows. I see the issue mainly that I would then be responsible to help with maintaining it works :D And also, I have never seen it before so that means its not as well adopted.

@insunaa
Copy link
Contributor Author

insunaa commented Oct 9, 2022

All the big Linux OSS projects use Meson. Gnome does, Systemd does and quite a few others too https://mesonbuild.com/Users.html

Also I've been maintaining a meson fork of tbc for months now, it doesn't need changes unless files are added or removed

@insunaa
Copy link
Contributor Author

insunaa commented Oct 31, 2022

The Meson build system
Version: 0.63.3
Source dir: /mnt/980pro/git/wotlk
Build dir: /mnt/980pro/git/wotlk/debiantest
Build type: native build
Project name: CMaNGOS WotLK
Project version: undefined
C compiler for the host machine: clang (clang 14.0.6-7 "Debian clang version 14.0.6-7")
C linker for the host machine: clang ld.lld 14.0.6
C++ compiler for the host machine: clang++ (clang 14.0.6-7 "Debian clang version 14.0.6-7")
C++ linker for the host machine: clang++ ld.lld 14.0.6
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Run-time dependency Boost (found: filesystem, program_options, system, thread) found: YES 1.74.0 (/usr)
Dependency mariadb found: YES 3.3.2 (cached)
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency mysql found: NO (tried pkgconfig and cmake)
Run-time dependency postgresql found: NO (tried pkgconfig and cmake)
Dependency zlib found: YES 1.2.11 (cached)
Dependency openssl found: NO found 3.0.5 but need: '<3.0.0' ; matched: '>=1.1.0'
Dependency openssl found: NO found "3.0.5" but need: '<3.0.0' ; matched: '>=1.1.0'
Run-time dependency openssl found: NO (tried pkgconfig, system and cmake)
Looking for a fallback subproject for the dependency openssl
Building fallback subproject with default_library=static

Executing subproject openssl

openssl| Project name: openssl
openssl| Project version: 1.1.1l
openssl| C compiler for the host machine: clang (clang 14.0.6-7 "Debian clang version 14.0.6-7")
openssl| C linker for the host machine: clang ld.lld 14.0.6
openssl| Dependency threads found: YES unknown (cached)
openssl| Program as found: YES 2.39 (/usr/bin/as)
openssl| Message: OpenSSL is configured with ASM support
openssl| Library dl found: YES
openssl| Build targets in project: 3
openssl| Subproject openssl finished.

Dependency openssl from subproject subprojects/openssl-1.1.1l found: YES 1.1.1l
Run-time dependency utf8cpp found: NO (tried pkgconfig and cmake)
Run-time dependency utfcpp found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency utfcpp
Building fallback subproject with default_library=static

Executing subproject utfcpp

utfcpp| Project name: utfcpp
utfcpp| Project version: 3.2.1
utfcpp| C++ compiler for the host machine: clang++ (clang 14.0.6-7 "Debian clang version 14.0.6-7")
utfcpp| C++ linker for the host machine: clang++ ld.lld 14.0.6
utfcpp| Build targets in project: 3
utfcpp| Subproject utfcpp finished.

Dependency utfcpp from subproject subprojects/utfcpp-3.2.1 found: YES 3.2.1
Run-time dependency derp found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency derp

Executing subproject bzip2

bzip2| Project name: bzip2
bzip2| Project version: 1.1.0
bzip2| C compiler for the host machine: clang (clang 14.0.6-7 "Debian clang version 14.0.6-7")
bzip2| C linker for the host machine: clang ld.lld 14.0.6
bzip2| Configuring bz_version.h using configuration
bzip2| Compiler for C supports arguments -Wall: YES (cached)
bzip2| Compiler for C supports arguments -Wextra: YES (cached)
bzip2| Compiler for C supports arguments -Wmissing-prototypes: YES (cached)
bzip2| Compiler for C supports arguments -Wstrict-prototypes: YES (cached)
bzip2| Compiler for C supports arguments -Wmissing-declarations: YES (cached)
bzip2| Compiler for C supports arguments -Wpointer-arith: YES (cached)
bzip2| Compiler for C supports arguments -Wdeclaration-after-statement: YES (cached)
bzip2| Compiler for C supports arguments -Wformat-security: YES (cached)
bzip2| Compiler for C supports arguments -Wwrite-strings: YES (cached)
bzip2| Compiler for C supports arguments -Wshadow: YES (cached)
bzip2| Compiler for C supports arguments -Winline: YES (cached)
bzip2| Compiler for C supports arguments -Wnested-externs: YES (cached)
bzip2| Compiler for C supports arguments -Wfloat-equal: YES (cached)
bzip2| Compiler for C supports arguments -Wundef: YES (cached)
bzip2| Compiler for C supports arguments -Wendif-labels: YES (cached)
bzip2| Compiler for C supports arguments -Wempty-body: YES (cached)
bzip2| Compiler for C supports arguments -Wcast-align: YES (cached)
bzip2| Compiler for C supports arguments -Wclobbered: NO (cached)
bzip2| Compiler for C supports arguments -Wvla: YES (cached)
bzip2| Compiler for C supports arguments -Wpragmas: YES (cached)
bzip2| Compiler for C supports arguments -Wunreachable-code: YES (cached)
bzip2| Compiler for C supports arguments -Waddress: YES (cached)
bzip2| Compiler for C supports arguments -Wattributes: YES (cached)
bzip2| Compiler for C supports arguments -Wdiv-by-zero: YES (cached)
bzip2| Compiler for C supports arguments -Wshorten-64-to-32: YES (cached)
bzip2| Compiler for C supports arguments -Wconversion: YES (cached)
bzip2| Compiler for C supports arguments -Wextended-offsetof: NO (cached)
bzip2| Compiler for C supports arguments -Wformat-nonliteral: YES (cached)
bzip2| Compiler for C supports arguments -Wlanguage-extension-token: YES (cached)
bzip2| Compiler for C supports arguments -Wmissing-field-initializers: YES (cached)
bzip2| Compiler for C supports arguments -Wmissing-noreturn: YES (cached)
bzip2| Compiler for C supports arguments -Wmissing-variable-declarations: YES (cached)
bzip2| Compiler for C supports arguments -Wsign-conversion: YES (cached)
bzip2| Compiler for C supports arguments -Wunreachable-code-break: YES (cached)
bzip2| Compiler for C supports arguments -Wunused-macros: YES (cached)
bzip2| Compiler for C supports arguments -Wunused-parameter: YES (cached)
bzip2| Compiler for C supports arguments -Wredundant-decls: YES (cached)
bzip2| Compiler for C supports arguments -Wheader-guard: YES (cached)
bzip2| Compiler for C supports arguments -Wno-format-nonliteral: YES (cached)
bzip2| ../subprojects/bzip2/meson.build:62: WARNING: Consider using the built-in warning_level option instead of using "-Wall".
bzip2| ../subprojects/bzip2/meson.build:62: WARNING: Consider using the built-in warning_level option instead of using "-Wextra".
bzip2| Compiler for C supports function attribute visibility: YES (cached)
bzip2| Program xsltproc found: NO
bzip2| Program sh found: YES (/usr/bin/sh)
bzip2| Program python3 found: YES (/usr/bin/python3)
bzip2| Program valgrind found: NO
bzip2| Build targets in project: 6
bzip2| Subproject bzip2 finished.

Dependency derp from subproject subprojects/bzip2 found: YES 1.1.0
Build targets in project: 16

CMaNGOS WotLK undefined

  Subprojects
    bzip2  : YES 2 warnings
    openssl: YES
    utfcpp : YES

  User defined options
    backend: ninja

Found ninja-1.11.1 at /usr/bin/ninja
Cleaning... 0 files.

Debian Unstable with Meson + Ninja (the "derp" dependency was just added as a proof of concept. We redistribute bzip2 in dep/src/bzip2 but it's a version from 2014 I think, like this I can just pull in the latest bzip2 directly from upstream

@Warlockbugs
Copy link
Member

I pushed openssl 3.0 support commit right away, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants