-
Notifications
You must be signed in to change notification settings - Fork 141
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
CMake update 3/3: provide install target #761
Conversation
re:
Same goes |
Yes, that's ok. When linking dynamically,
I agree, the behaviour should be identical where possible. Not sure whether it is, in this case; |
CMake can execute script fragment with EDIT(PSA): You'll still need |
Good suggestion, I did it as proposed and I think it's much better like this. Images and |
It seems image creation doesn't work on Windows, right? It requires the |
Yep, unfortunately, not yet. |
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.
@ashinn : It's ready to roll.
Future work: I think we should have several build modes on build. e.g.
- Tool mode : Default(except Win32), install to
/usr/local
etc and honor it as default loading path. - Prefix-free tool mode : Win32 or using
chibi-scheme
during build process of other apps (only). Use relative path from the executable as default loading path. Maybe also useful on platforms we cannot control install path such as Android or iOS. - Embedded mode : Embed
chibi-scheme
program inside application w/ users application image(.img and .meta).
In other Schemes, NMosh and Sagittarius support 1 and 2 implicitly. Gauche showed interested in mode 3 before but I'm not sure it's current status.
@ashinn : Friendly ping; are we okay to merge this? Changes do not affect standard |
@okuoku, sorry for the delay, yes this looks good to merge. The future work sounds reasonable as well. Regarding better Windows support, while I can't hack on this directly, if you have refactorings or feature requests which would make that easier feel free to create tickets. |
@lubgr : Thank you for looking into cmake buildsystem. I might do some nitpicks for Windows later but anyway it's awesome having modernized CMakeLists. (For future contributions, please consider building concise Git history -- fewer commits would be better. Since Git preserves complete history, we reviewers need to check every commits before merge. You can arrange Git history with |
Looking forward to seeing future improvements on the Windows side of things! I thought about having a look at how straightforward it might be to dynamically load
Will do! |
Follow-up
CMake
PR that fleshes outinstall
targets. In short, this enables the following:will build shared libraries, the three image dumps and package metadata, and install it into
/usr/local
. The install path can be changed withcmake -D CMAKE_INSTALL_PREFIX=/my/custom/path
, which will in turn show up in theinstall.h
search paths (Unix platforms only, it's empty on Windows).There is some additional plumbing to ensure that the installation works well with
CMake
projects using chibi. Given aCMake
-configured chibi installation under a standard Unix path like/usr
or/usr/local
(other paths work when passingcmake -D CMAKE_PREFIX_PATH=/non/standard
), the following sets up an embedding application:All necessary linker and preprocessor flags will automatically be configured, and it works with a shared or a static library build/installation.
As an aside, I compared the current
make install
result to the result from theCMake
-configured installation (mainly by means oftree
), which raised the following questions:*-test.sld
files. Is that intended?srfi/18
andchibi/
, why is that?lib/scheme/mapping/hash.sld
andlib/srfi/160/uvector.scm
are currently not installed, is this intended?Also:
Lastly, the following PRs might make sense if that's desired from your point of view.
make
is the standard build tooling)