Commit Graph

44 Commits

Author SHA1 Message Date
Ahmad Fatoum
182bdd2e0a Travis CI: bump installed wayland-protocols to v1.15
Move away from v1.12 as GLFW now requires >= 1.15.
2019-01-08 09:03:22 +01:00
Ahmad Fatoum
285de106d4
Travis CI: emscripten: properly fix failing CMake install stage
The .travis.yml is getting increasingly ugly. We should maybe consider
creating separate shell scripts for each target..
2019-01-06 23:09:20 +01:00
Ahmad Fatoum
dc415b9a5e
Travis CI: emscripten: fix failing CMake install stage 2019-01-06 21:14:46 +01:00
Ahmad Fatoum
d3a46cc9d4
Travis CI: s/make/cmake --build/ for msvc compatibility
CMake defaults to generating a Visual Studio build on Windows,
which doesn't involve make. Thus use cmake --build to abstract
that detail away. We already do that in the appveyor.yml.

The install line is a bit hacky: cmake might not be in the search
path when using sudo, thus use "$(which cmake)" to get the path,
sudo doesn't seem to be available on the Travis CI windows
environment, so use $(which sudo) without quotes to expand to
nothing if that's the case...
2019-01-06 20:42:51 +01:00
Ahmad Fatoum
127c44dafe
Revert "Update .travis.yml"
This reverts commit 214aa0c1b0.
2019-01-06 19:53:17 +01:00
raysan5
214aa0c1b0 Update .travis.yml 2019-01-03 16:07:51 +01:00
raysan5
34d110bb3e Trying to get Windows build on Travis CI 2019-01-03 15:15:54 +01:00
raysan5
d2e861fdce Test Windows compilation on Travis CI 2019-01-02 18:00:22 +01:00
Ray
c2aa1fed7b Removed OpenAL backend 2018-10-18 11:38:42 +02:00
Ahmad Fatoum
3f09726331
CMake: Major cleanup to support find_package(raylib)
Remove that link_libraries_to_executable() hack and defines a proper
raylib target that can be used with target_link_libraries.

The same target is also available for external (user) code by using
find_package(raylib).

This results in:

- Remove hardcoded build directories from examples and games CMakeLists.txt
- Allow rlgl_standalone and other special examples to be built easily
- Allow CMake projects to find_package(raylib instead of fiddling with pkg-config
- Makes code a little more maintainable
- Fixes #471, #606.
- Makes code less confusing by removing the double use of PLATFORM (#584).

Note that this is still not _The Right Way_(TM), because normally
raylib-config.cmake (or its includes) would be automatically generated.
I didn't manage to get that to work though, so I went the easier route
of just wrapping pkg_check_modules for consumption by find_package.
2018-07-29 12:35:35 +02:00
Ahmad Fatoum
3e5093eab0
CI: Build with all optional formats enabled
also makes one configuration shared-only

dr_flac is not built on i386, because GCC 4.8 complains about asm("cpuid"
clobbering ebx, as it's using ebx for PIC.

Instead of downloading a newer GCC (and multilib),
disable FLAC for that one configuration...
2018-07-29 12:13:01 +02:00
Ahmad Fatoum
69e147417b
Travis CI: Add OpenAL-Configuration 2018-07-29 12:13:00 +02:00
Ahmad Fatoum
b7d8c62bfd
Traivs CI: Add newer (9.4.1) Xcode configuration 2018-07-25 00:51:39 +02:00
Ahmad Fatoum
a5311eddf0
Travis CI: remove stray $ in .travis.yml
Fixes: 1d0ba96 ("Add GLFW-installed-but-using-our-GLFW-anyway configuration")
2018-07-23 21:13:54 +02:00
Ahmad Fatoum
1d0ba96c9e
Travis CI: Add GLFW-installed-but-using-our-GLFW-anyway configuration 2018-07-23 19:45:44 +02:00
Ahmad Fatoum
758a774173
Travis CI: Add arm32-android configuration 2018-07-10 18:08:39 +02:00
Ahmad Fatoum
c3aeaf4a49
Travis CI: Add test case for pkg-config 2018-07-03 21:35:28 +02:00
Ahmad Fatoum
e025e62445 cmake: Fix PLATFORM_WEB build
Did this ever work? Surely, doesn't look like it...
2018-05-21 12:15:39 +02:00
Ahmad Fatoum
bd2300fed3
CMake+Android: Skip tests with SetCameraMode
src/core.c does explicitly skip including <camera.h> on Android
and tests fail. Therefore skip these failing tests.

Closes #507.
2018-05-21 01:17:13 +02:00
Ahmad Fatoum
ad8509732c
CMake: Fix (Add?) Android support
Not sure if this ever worked, but now it at least compiles.
2018-05-21 01:08:29 +02:00
Ahmad Fatoum
0f1aaa474a
CMake: (Properly) build glfw separately with CMake
This reverts commit 2d6fb5c628,
and adds a fix for Alien::raylib's test failures.

The tests failed because the resulting static library didn't reexport
GLFW symbols. As a fix, we now have GLFW create a CMake "object library"
target that we can link with both the static and shared raylib.

This is arguably ugly... Proper fix would probably be a GLFW upstream
object library target.

Closes #536.
2018-05-12 18:38:20 +02:00
Ahmad Fatoum
2d6fb5c628
Revert "CMake: Build glfw separately with CMake"
This reverts commit 0adb4b67de,
because it failed tests for Alien::raylib:
http://www.cpantesters.org/distro/A/Alien-raylib.html
2018-05-11 23:43:35 +02:00
Ahmad Fatoum
a0f9c2b1eb
Travis CI: Test Wayland configuration as well 2018-05-11 01:25:13 +02:00
Ahmad Fatoum
7243cebad1
Travis CI: Test building with external GLFW 2018-05-11 01:24:38 +02:00
Ahmad Fatoum
0adb4b67de
CMake: Build glfw separately with CMake
Makes it easier to support Wayland later on.
2018-05-11 01:24:27 +02:00
Ahmad Fatoum
d892243d18
CI: Build artifacts for master, not develop tags
See #443 for more information.
2018-02-19 13:56:55 +01:00
Ahmad Fatoum
051040af2d
CMake: Remove _RAYLIB suffix from -D{SHARED,STATIC}_RAYLIB
They were named so for compatibility with make, but make doesn't use
the anymore. I always forget whether it's SHARED_RAYLIB or
RAYLIB_SHARED...

For now, RAYLIB_SHARED and STATIC_RAYLIB may still be used,
but print a deprecation warning.
2018-02-16 05:58:18 +01:00
Ahmad Fatoum
184df917be
Travis CI: Don't use external GLFW
While nice to test, this would mean that the tagged release will depend
on GLFW as well… Therefore disable it for now.
2018-02-04 13:35:18 +01:00
Ahmad Fatoum
cb66c89dfa
CMake: Rename WITH_SYSTEM_GLFW to USE_EXTERNAL_GLFW
for consistency with Makefile. Requested by @raysan5 in #453.
2018-02-04 12:10:23 +01:00
Ahmad Fatoum
7f5fa4d49c
CMake: Add tristate option for using system GLFW (#455)
-DWITH_SYSTEM_GLFW=ON: Link against system glfw and fail otherwise
-DWITH_SYSTEM_GLFW=OFF: Use embedded rglfw.c
-DWITH_SYSTEM_GLFW=IF_POSSIBLE: Probe for system glfw but fallback to
                                rglfw if unavailable

Also change Linux 64-bit CI build to install system glfw and use it,
so this doesn't bitrot.

Addresses #453.
2018-02-03 10:17:51 +01:00
Ahmad Fatoum
d5bbcbc15f
Travis CI: Don't set CFLAGS=-m64 for macOS build 2018-01-27 01:05:17 +01:00
Ahmad Fatoum
1ab3c058f5
Drop libglew-dev as prereq for Travis build
Noted by @eserte in athreef/Alien-raylib#2. Thanks!
2018-01-26 22:14:05 +01:00
Ahmad Fatoum
263e81b5c9
Build shared libs, games and examples on CI
Now with external OpenAL and GLFW dependencies removed,
we don't have to worry about installing them in CI.
Shared libraries are now always built along with static libs.
Games and examples are built everwhere except for Visual Studio,
because Physac needs pthreads, which VS doesn't provide.
2017-12-14 13:26:10 +01:00
Ahmad Fatoum
de78fa69bc Fix CI builds after mini_al changes 2017-12-10 21:35:38 +01:00
Ahmad Fatoum
ca921e5a53 CMake: Explicitly ask for C99 support
Otherwise using a compiler that defaults to -std=c89 or -std=gnu89 will
fail. Example:
http://www.cpantesters.org/cpan/report/abb85066-d283-11e7-9926-b2f4efb9c382

Apparently, -m32 Travis CI build was broken: -m32 was overridden by
-std=gnu99.  This fixes that.
2017-11-27 02:10:56 +01:00
Ahmad Fatoum
f991a075e1 Build examples and games on Travis CI
They were disabled because they failed to build,
but this patch set fixes the build on Linux and macOS.

This doesn't apply to the AppVeyor build on Windows yet;
it currently fails at linking with OpenAL.
2017-11-25 21:45:31 +01:00
Ahmad Fatoum
d54ea107f7
[CI] Push Github artifacts only on tag
Forgot that one the first time round, which created some unnecssary
releases.
2017-11-24 23:03:02 +01:00
Ahmad Fatoum
13fa61f7d9
CI: Only push binaries for develop branch builds
... for now.
Syntax was confusing Travis CI, AppVeyor is reporting 401,
so lets see if this change at least fixes Travis.

If this doesn't work, it might be that @raysan5's token is required.
2017-11-24 22:53:07 +01:00
Ahmad Fatoum
49c5a433df
Setup CMake package target and CI auto-deploy tags
cmake --build . --target package # or make package if make is used

can now be used to create binary packages for raylib.

AppVeyor and Travis CI are configured to push the artifacts
that result from building git tags to the related Github releases page.
2017-11-24 21:24:35 +01:00
Ahmad Fatoum
44376c04fa
Generate and install pkg-config pc file
After installation, compiling new programs is possible with
    $ cc game.c `pkg-config --static --libs --cflags raylib`
or
    $ cc game.c `pkg-config --libs --cflags raylib`
depending on configuration

Also adds following configuration options:
- WITH_PIC "Compile static library as position-independent code"
- STATIC_RAYLIB "Build raylib as a static library"
- MACOS_FATLIB  "Build fat library for both i386 and x86_64 on macOS"
2017-11-24 17:15:33 +01:00
Ahmad Fatoum
b2acff66de
Fix macOS build of new rglfw.c approach
There have been two problems:

* GLFW itself was compiled with the definitions for compiling
_against_ GLFW (fixed by removing requirement for external glfw)

* rglfw.c was being compiled as C code, although it includes
Objective C files.

This _might_ break the Windows build, needs to be checked.

Fixes #391, but as noted I'd prefer though a separate source directory
and build script for GLFW.
2017-11-22 23:11:41 +01:00
Ray
f70a0a996c Review file issue 2017-11-22 19:51:38 +01:00
Ray San
9ec8c0f1d6 Updated OSX compilation with clang 2017-11-22 17:30:09 +01:00
Ahmad Fatoum
f4a2d1ef29
Add Travis CI integration
Also adds commented-out deployment on tag specification
(push build artifacts to Github releases page).
2017-10-12 10:16:30 +02:00