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

[build] Examples should build without the project being installed #452

Closed
yurivict opened this issue Feb 2, 2018 · 10 comments
Closed

[build] Examples should build without the project being installed #452

yurivict opened this issue Feb 2, 2018 · 10 comments
Labels
help needed - please! I need help with this issue

Comments

@yurivict
Copy link
Contributor

yurivict commented Feb 2, 2018

Currently, it doesn't find the header and the library.
I tried to create a FreeBSD port option that would have built and installed examples, but with the current setup this is impossible.

@a3f
Copy link
Contributor

a3f commented Feb 2, 2018

Is CMake an option? You could build the develop branch with

- cmake -DMACOS_FATLIB=ON -DSTATIC_RAYLIB=ON -DSHARED_RAYLIB=ON -DBUILD_EXAMPLES=ON -DBUILD_GAMES=ON ..

@raysan5 raysan5 changed the title Examples should build without the project being installed [build] Examples should build without the project being installed Feb 3, 2018
@raysan5
Copy link
Owner

raysan5 commented Feb 3, 2018

Sorry, don't understand this issue, you mean adding FreeBSD in release folder?

@yurivict
Copy link
Contributor Author

yurivict commented Feb 3, 2018

No. Currently examples fail when raylib isn't installed.

@raysan5
Copy link
Owner

raysan5 commented Feb 3, 2018

Currently examples fail when raylib isn't installed.

Is it not the expected behaviour? I mean, raylib examples require the library to be installed to be compiled. Excuse me if I'm missing the point...

@yurivict
Copy link
Contributor Author

yurivict commented Feb 3, 2018

What I meant is that examples should build as part of the project using the locally built library.
For example, if I would like the port to install examples, they should be built as part of the project, and then installed. Currently it expects that the library is installed before it can build examples.

@raysan5
Copy link
Owner

raysan5 commented Feb 3, 2018

Ok, I see, thanks for the clarification.

@raysan5 raysan5 added the help needed - please! I need help with this issue label Feb 4, 2018
@RDR8
Copy link
Contributor

RDR8 commented Feb 5, 2018

I'm working on updates to the install target in src/Makefile that help with this situation. I'm on Linux but I suspect it could be useful with FreeBSD as well. Basically, it's the addition of RAYLIB_INSTALL_PATH and RAYLIB_H_INSTALL_PATH into the Makefiles to expose some control to the user at install time and copying all the the headers, not just raylib.h, to your local include directory. This lets one build and run the examples, etc against the library we just built. Currently, this isn't fully configured for Linux in src/ or examples/Makefile. From a beginner's point of view, it's not obvious that the examples are running against the stuff in release/ etc or even that it matters . For example, if one runs make clean after "installing" raylib, the examples won't work. It wipes the provided libraylib.a as well. It would be nice to have a fail-safe, maybe by moving build products to a new build/ dir instead of release/. I have a working configuration using the traditional /usr/local setup with standard utils but it's not quite done. It was perfect, until it wasn't. (^;

@RDR8
Copy link
Contributor

RDR8 commented Feb 12, 2018

Maybe take at look at #464 and see if it could be tweaked for FreeBSD.

@RDR8
Copy link
Contributor

RDR8 commented Feb 22, 2018

@yurivict , #480 is more progressive. It solves:

What I meant is that examples should build as part of the project using the locally built library.
For example, if I would like the port to install examples, they should be built as part of the project, aand report.nd then installed. Currently it expects that the library is installed before it can build examples.

on Linux. FreeBSD should be easy to integrate. It would take some time but if someone is familiar with the details...

@yurivict, if you have an opportunity to examine these changes, please report. Thank you!

@raysan5
Copy link
Owner

raysan5 commented Apr 3, 2018

Just closing this issue. Please, feel free to reopen it if still not correct.

@raysan5 raysan5 closed this as completed Apr 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help needed - please! I need help with this issue
Projects
None yet
Development

No branches or pull requests

4 participants