diff --git a/CMakeLists.txt b/CMakeLists.txt index b47a765..59f4937 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 "") diff --git a/README.md b/README.md index d8e3fea..7c916a1 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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 @@ -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.