diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e0be4e..ff82fd1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,11 @@ if (NOT LUA_INCLUDE_DIR) find_package(Lua REQUIRED) endif() -include_directories(${LUA_INCLUDE_DIR} rapidjson/include) +if (NOT RAPIDJSON_INCLUDE_DIRS) + set(RAPIDJSON_INCLUDE_DIRS=rapidjson/include) +endif() + +include_directories(${LUA_INCLUDE_DIR} ${RAPIDJSON_INCLUDE_DIRS}) add_library (rapidjson MODULE src/rapidjson.cpp) diff --git a/README.md b/README.md index 650bbf1..bb3d307 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,10 @@ bug report and feature request. luarocks install rapidjson +or if you like to use your own version of RapidJSON, use: + + luarocks install rapidjson RAPIDJSON_INCLUDE_DIRS=path/to/rapidjson/include/dir + ```Lua local rapidjson = require('rapidjson') @@ -310,6 +314,10 @@ The current loaded rapidjson version. `"scm"` when not build with luarocks. ## Changelog +### 0.4.3 + +* CMakeLists.txt supports command line defined `RAPIDJSON_INCLUDE_DIRS` to specified RapidJSON include directory. + ### 0.4.2 * Update RapidJSON to latest HEAD version. diff --git a/rapidjson-0.4.2-1.rockspec b/rapidjson-0.4.3-1.rockspec similarity index 98% rename from rapidjson-0.4.2-1.rockspec rename to rapidjson-0.4.3-1.rockspec index ffb8be8..be1faa4 100644 --- a/rapidjson-0.4.2-1.rockspec +++ b/rapidjson-0.4.3-1.rockspec @@ -1,5 +1,5 @@ package = "rapidjson" -version = "0.4.2-1" +version = "0.4.3-1" local v = version:gsub("%-%d", "") source = { url = "git://github.com/xpol/lua-rapidjson",