Skip to content

Commit

Permalink
Add a target to RapidJSONConfig.cmake.in (#1350)
Browse files Browse the repository at this point in the history
This way, users can call target_link_libraries against the imported target, which is the recommended way of doing things.
  • Loading branch information
tchernobog authored Mar 30, 2020
1 parent 234ff04 commit f376690
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions RapidJSONConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ 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@" )
message(STATUS "RapidJSON found. Headers: ${RapidJSON_INCLUDE_DIRS}")

if(NOT TARGET rapidjson)
add_library(rapidjson INTERFACE IMPORTED)
set_property(TARGET rapidjson PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${RapidJSON_INCLUDE_DIRS})
endif()

1 comment on commit f376690

@nwaf111a
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.