Skip to content

Cmake tinkering #9

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ project(XLisp
LANGUAGES C)

add_library(xlisp "")
if(UNIX)
target_link_libraries(xlisp m)
set_target_properties(xlisp PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif (UNIX)
add_subdirectory(src)

add_library(ext SHARED "")
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Version 3.0
February 18, 2006

## Building with CMake
We've added the ability to build with CMake to simplify building XLisp on your
We've added the ability to build with CMake to simplify building xlisp on your
system. The way that we expect this to work on Linux systems using `make` would
be to first make a build directory. For this walkthrough we'll say that we
start _in_ the xlisp directory:
Expand All @@ -19,10 +19,12 @@ ccmake ../xlisp
```
So, now we have made a build directory outside of xlisp, so that the build
products don't get strewn all over our pristine source. The `ccmake` command is
a curses front end to CMake that I like. From there you can pick the type of
build, then type "g" for generate. This drops you out in a shell prompt, where
it has made makefiles for you (on other platforms, you may have other types of
build files generated). After that you can:
a curses front end to CMake that I like. In `ccmake` you would first
_configure_ (with "c"), then select your build type (typically "Release"), then
_configure_ again, then _generate_ (with "g"). You will then be back in your
shell, where makefiles have been set up for you. (CMake isn't constrained to
only makefiles, but can also be instructed to generate most other kinds of
build files). After that you can:

```bash
make
Expand All @@ -48,4 +50,4 @@ Bedford, US, NH 03110

All Rights Reserved

See the included file LICENSE for the full license.
See the included file `LICENSE.txt` for the full license.