Commit 468258d 1 parent 6244594 commit 468258d Copy full SHA for 468258d
File tree 1 file changed +11
-3
lines changed
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
150
150
### Includes
151
151
152
152
if (USE_SYSTEM_RAPIDJSON)
153
- find_package (RapidJSON QUIET )
153
+ set (RapidJSON_MIN_VERSION "1.1.0" )
154
+ find_package (RapidJSON ${RapidJSON_MIN_VERSION} QUIET )
154
155
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} " )
156
157
endif ()
157
158
endif ()
158
159
if (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 ()
160
168
endif ()
161
169
162
170
target_include_directories (ccls PRIVATE src)
You can’t perform that action at this time.
0 commit comments