Skip to content

Commit

Permalink
CMake: Canonicalize rapidjson include path in RapidJSONConfig.cmake.
Browse files Browse the repository at this point in the history
Having the path without relative components allows other projects to add the
RadidJSON_INCLUDE_DIRS as a system include directory, without causing problems
in the build.
  • Loading branch information
bastianbeischer committed Apr 29, 2019
1 parent 01950eb commit c9b57bd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions RapidJSONConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ set( RapidJSON_DIR "@CONFIG_DIR@")
# Compute paths
get_filename_component(RapidJSON_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)

set( RapidJSON_INCLUDE_DIR "@RapidJSON_INCLUDE_DIR@" )
set( RapidJSON_INCLUDE_DIRS "@RapidJSON_INCLUDE_DIR@" )
# Canonicalize relative path
get_filename_component(RapidJSON_INCLUDE_DIR "@RapidJSON_INCLUDE_DIR@" REALPATH)
set( RapidJSON_INCLUDE_DIRS "${RapidJSON_INCLUDE_DIR}" )

message(STATUS "RapidJSON found. Headers: ${RapidJSON_INCLUDE_DIRS}")

0 comments on commit c9b57bd

Please sign in to comment.