CMakeLists: include path fix + compatibility.
This commit is contained in:
parent
d621dc9e9c
commit
b1c0c2843f
@ -195,7 +195,7 @@ install(FILES readme.md
|
||||
# Add an interface target to export it
|
||||
add_library(RapidJSON INTERFACE)
|
||||
|
||||
target_include_directories(RapidJSON INTERFACE $<INSTALL_INTERFACE:include/rapidjson>)
|
||||
target_include_directories(RapidJSON INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
|
||||
install(DIRECTORY include/rapidjson
|
||||
DESTINATION "${INCLUDE_INSTALL_DIR}"
|
||||
|
@ -17,3 +17,7 @@ get_filename_component(RapidJSON_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
get_target_property(RapidJSON_INCLUDE_DIR RapidJSON INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
set( RapidJSON_INCLUDE_DIRS ${RapidJSON_INCLUDE_DIR} )
|
||||
|
||||
if(NOT TARGET rapidjson)
|
||||
add_library(rapidjson ALIAS RapidJSON)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user