Commit Graph

7 Commits

Author SHA1 Message Date
Ahmad Fatoum
6c812b56d9
CMake: pkg-config: fix usage for RedHat-like systems (#728)
$prefix/lib isn't in pc_path on Fedora 28:

    [root@fedora-28 ~]# pkg-config --variable=pc_path pkg-config
    /usr/lib64/pkgconfig:/usr/share/pkgconfig

This has the effect that the pkg-config file is written to the
correct location but pkg-config --libs raylib doesn't output
the correct library path. This fixes this problem by substituting
the directory names into the .pc, same as we do with the CMakeLists.txt
since #518.

This issue popped up during the automated test of the Perl bindings:
    https://github.com/athreef/Alien-raylib/issues/3
2019-01-19 13:52:55 +01:00
Ray
be599a9ece enjoy! 2018-09-18 21:34:02 +02:00
Ahmad Fatoum
414bb6018b
CMake: Add Libs.private to Libs if installing static only
pkg-config --libs --static raylib and pkg-config --libs raylib
should give the same result if there is no shared raylib installed.
2018-07-10 21:20:01 +02:00
Ahmad Fatoum
61747508b0
CMake: Reuse libraries found by glfw CMake config
if (${PLATFORM} MATCHES "Desktop")
  target_link_libraries(${RAYLIB}_shared glfw ${GLFW_LIBRARIES})

was never true because PLATFORM STREQUAL "PLATFORM_DESKTOP"...

This fixes #551 and makes the changes suggested in #552 (commited as 965cc8ab)
unnecessary.
2018-07-03 21:35:27 +02:00
Ahmad Fatoum
1be72a2e72
pkg-config: Empty Requires.private on shared-only build
If user doesn't build the static library,
`pkg-config --static --libs raylib` should be equivalent to
`pkg-config --libs raylib`.
2018-02-11 20:10:50 +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