From 8e9a8792a9edf9921e97fdb35c95bc0f3221ec25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20M=C3=B6ller?= Date: Thu, 30 Nov 2017 13:26:45 +0100 Subject: [PATCH] moved natis to root dir --- CMakeLists.txt | 18 ++++++++++++------ src/json.natvis => nlohmann_json.natvis | 0 2 files changed, 12 insertions(+), 6 deletions(-) rename src/json.natvis => nlohmann_json.natvis (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33ca38b09..2cd13b8eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,15 +36,15 @@ target_include_directories( INTERFACE $ ) -## -## add debug view defintion file for msvc -## +## add debug view defintion file for msvc (natvis) [cmake <= 3.2.2 does not support export of source files] if (MSVC AND CMAKE_VERSION VERSION_GREATER "3.2.2") + set(NLOHMANN_ADD_NATVIS TRUE) + set(NLOHMANN_NATVIS_FILE "nlohmann_json.natvis") target_sources( ${NLOHMANN_JSON_TARGET_NAME} INTERFACE - $ - $ + $ + $ ) endif() @@ -79,6 +79,12 @@ install( FILES ${NLOHMANN_JSON_CMAKE_PROJECT_CONFIG_FILE} ${NLOHMANN_JSON_CMAKE_VERSION_CONFIG_FILE} DESTINATION ${NLOHMANN_JSON_CONFIG_INSTALL_DIR} ) +if (NLOHMANN_ADD_NATVIS) + install( + FILES ${NLOHMANN_NATVIS_FILE} + DESTINATION . +) +endif() install( TARGETS ${NLOHMANN_JSON_TARGET_NAME} EXPORT ${NLOHMANN_JSON_TARGETS_EXPORT_NAME} @@ -87,4 +93,4 @@ install( install( EXPORT ${NLOHMANN_JSON_TARGETS_EXPORT_NAME} DESTINATION ${NLOHMANN_JSON_CONFIG_INSTALL_DIR} -) +) \ No newline at end of file diff --git a/src/json.natvis b/nlohmann_json.natvis similarity index 100% rename from src/json.natvis rename to nlohmann_json.natvis