File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -150,13 +150,21 @@ set_property(SOURCE src/utils.cc APPEND PROPERTY COMPILE_DEFINITIONS
150150### Includes
151151
152152if (USE_SYSTEM_RAPIDJSON)
153- find_package (RapidJSON QUIET )
153+ set (RapidJSON_MIN_VERSION "1.1.0" )
154+ find_package (RapidJSON ${RapidJSON_MIN_VERSION} QUIET )
154155 if (NOT DEFINED RapidJSON_INCLUDE_DIRS AND DEFINED RAPIDJSON_INCLUDE_DIRS)
155- message (FATAL_ERROR "RapidJSON version is likely too old. See https://github.com/MaskRay/ccls/issues/455 " )
156+ set (RapidJSON_INCLUDE_DIRS " ${RAPIDJSON_INCLUDE_DIRS} " )
156157 endif ()
157158endif ()
158159if (NOT RapidJSON_FOUND)
159- set (RapidJSON_INCLUDE_DIRS third_party/rapidjson/include )
160+ if (EXISTS "${CMAKE_SOURCE_DIR} /third_party/rapidjson/include" )
161+ message (STATUS "Using local RapidJSON" )
162+ set (RapidJSON_INCLUDE_DIRS third_party/rapidjson/include )
163+ else ()
164+ message (STATUS "Plase initialize rapidJSON git submodule as currently installed version is to old:" )
165+ message (STATUS "git submodule init && git submodule update" )
166+ message (FATAL_ERROR "RapidJSON version is likely too old. See https://github.com/MaskRay/ccls/issues/455" )
167+ endif ()
160168endif ()
161169
162170target_include_directories (ccls PRIVATE src)
You can’t perform that action at this time.
0 commit comments