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
Mostly CMake stuff #106
base: master
Are you sure you want to change the base?
Mostly CMake stuff #106
Conversation
I don't know if we're planning to have this ever be turned off, but at least the ambiguity between SDL & SDL_GFX is removed. Also, USE_SDLGFX is renamed to USE_SDL_GFX, to fit CMake's style. (Not worrying too much since currently -DUSE_SDLGFX doesn't build anyways.)
I have barely tested this, but it's better than no builds to test? Also, fun fact, launching this build on a fresh user data directory (no xm.db) corrupts the database because the version doesn't ever get written! Or something. I had to remove it anyhow while testing.
This module was added in CMake 3.14, but we can vendor it until the next Debian stable release.
If the build is using system libraries (for bzip2, lua, ode, or xdgbasedir), there's no need to add the corresponding subdirectories. This reduces build time and avoids potential mix-ups. Signed-off-by: Stephen Kitt <steve@sk2.org>
This commit switches over the following: + CURL (library, REQUIRED) + JPEG (library, REQUIRED) + Xml2 (library, REQUIRED) + PNG (library, REQUIRED) + SQLite3 (library, REQUIRED) + ZLIB (library, REQUIRED)
This commit switches over the following: + Intl (library, if(USE_GETTEXT) -> REQUIRED) + LibLZMA (libary, if(STATIC_BUILD)) + SDL (library, if(USE_SDL) -> REQUIRED) + SDL_gfx (library, if(USE_SDL) -> if(USE_SDL_gfx) -> REQUIRED) + SDL_mixer (library, if(USE_SDL) -> REQUIRED) + SDL_net (library, if(USE_SDL) -> REQUIRED) + SDL_ttf (library, if(USE_SDL) -> REQUIRED)
This commit switches over the following: + OpenGL (library, if(USE_OPENGL) -> REQUIRED)
This commit switches over the following: + BZip2 (library, system/vendor) + Lua (library, system/vendor) + ODE (library, system/vendor) + XDG (library, system/vendor) Additionally, the following are brought into style: + Chipmunk (library, vendor) + Md5sum (library, vendor) + Glad (generated) (library, vendor)
alright, looks like 3.13 is too much for Travis:
so going through the documentation again to make sure everything's compatible will be fun. (how are they behind Debian stable?) EDIT: ah, it's an LTS behind (20.04 is latest) |
ugh, 3.13 added |
Thought: it's reasonable to ask for CMake from backports if you're a LTS behind on your distribution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, 1 of 1 files at r2, 2 of 2 files at r3, 11 of 11 files at r4, 12 of 12 files at r5, 4 of 4 files at r6, 4 of 4 files at r7, 1 of 1 files at r8, 1 of 1 files at r9, 1 of 1 files at r10, 14 of 14 files at r11, 2 of 2 files at r12, 10 of 10 files at r13, 2 of 2 files at r14, 1 of 1 files at r15, 11 of 11 files at r16.
Reviewable status: complete! all files reviewed, all discussions resolved
This only worked on my system because of `if(NOT Intl_LIBRARY)`.
b746cc8
to
ea87f5b
Compare
03aeca7
to
885a7ee
Compare
Okay, fun facts from debugging Travis CI's CMake:
|
X-Moto allows certain libraries to be provided either by the system or X-Moto's source tree itself, as vendored dependencies. (Not all vendored dependencies may be provided by the system, such as Chipmunk.) These are called vendorable libraries here. With a USE_SYSTEM_* option ON, that vendorable library is system. With a USE_SYSTEM_* option OFF, that vendorable library may be either system or vendored. With the USE_SYSTEM option OFF, all USE_SYSTEM_* options are OFF. With the USE_SYSTEM option ON, all USE_SYSTEM_* options default ON. With a PREFER_SYSTEM_* option ON, that vendorable library is searched for and is system if found. With the PREFER_SYSTEM option ON, all PREFER_SYSTEM_* options default ON. With the PREFER_SYSTEM option OFF, all PREFER_SYSTEM_* options are OFF. With the USE_SYSTEM option OFF, the PREFER_SYSTEM option defaults ON. With the USE_SYSETM option ON, the PREFER_SYSTEM option is OFF. The upshot of all this is that USE_SYSTEM ON means libraries are explicitly either system or vendored, with failed system searches erroring instead of falling back to vendored, and both USE_SYSTEM & PREFER_SYSTEM OFF means all libraries are vendored. This should be good for maintainers?
Yes: #include <lua.h> No: #include <lua/lua.h>
wheee Travis has CMake 3.12.4
ff025e9
to
c715e45
Compare
SonarCloud Quality Gate failed. 0 Bugs No Coverage information Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
what if cmake was slightly less bad
Please review the individual commits first before trying to look at the whole change set.
This change is