Add FindRapidJSON.cmake - #154
Conversation
The config mode version provided by OpenSuSE Leap 16.0 lowers the CMAKE_MINIMUM_REQUIRED_VERSION to 3.0. The workarounds are all annoying, so provide a simple FindRapidJSON.cmake file directly.
It isn't really clear to me what you work around here, but RapidJSON ships its own cmake_minimum_required(VERSION 4.4)
find_package(RapidJSON REQUIRED)
add_library(rj rj.cc)
target_include_directories(rj PUBLIC ${RAPIDJSON_INCLUDE_DIRS}) # var name on 1.1.0
target_include_directories(rj PUBLIC ${RapidJSON_INCLUDE_DIRS}) # var name on `master`RapidJSON hasn't put out a release in 10 years, and we currently use some unreleased snapshot of |
|
As in the description: The config mode version provided by OpenSuSE Leap 16.0 lowers the CMAKE_MINIMUM_REQUIRED_VERSION to 3.0. The error is then about IN_LIST policy
I had assumed distros update anyhow (Fedora, for example, ships a snapshot from 2024), but the Ubuntu 24.04 build fails on Clang, so I think I'll just close this and maybe we try in a few years again. |
|
I think instead of duplicating functionality a better way would be to fix the invocation to # Override builtin `cmake_minimum_required` so we can control the passed `VERSION`.
macro(cmake_minimum_required)
# Pass all arguments but `VERSION` which we override with what this project was configured with.
cmake_parse_arguments(_CMR "" "VERSION" "" ${ARGN})
_cmake_minimum_required(VERSION ${CMAKE_MINIMUM_REQUIRED_VERSION} ${_CMR_UNPARSED_ARGUMENTS})
endmacro() |
The config mode version provided by OpenSuSE Leap 16.0 lowers the CMAKE_MINIMUM_REQUIRED_VERSION to 3.0. The workarounds are all annoying, so provide a simple FindRapidJSON.cmake file directly.