Skip to content

Commit e757b44

Browse files
authored
Merge pull request #487 from SamVanheer/add-natvis-install
Add EASTL.natvis to EASTL when using MSVC and install to doc directory
2 parents 943ac2b + cf39eb2 commit e757b44

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ include(CommonCppFlags)
2323
file(GLOB EASTL_SOURCES "source/*.cpp")
2424
add_library(EASTL ${EASTL_SOURCES})
2525

26+
if (MSVC)
27+
set(EASTL_NATVIS_DIR "doc")
28+
set(EASTL_NATVIS_FILE "${EASTL_NATVIS_DIR}/EASTL.natvis")
29+
target_sources(EASTL INTERFACE
30+
$<INSTALL_INTERFACE:${EASTL_NATVIS_FILE}>
31+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/${EASTL_NATVIS_FILE}>
32+
)
33+
endif()
34+
2635
if(EASTL_BUILD_BENCHMARK)
2736
add_subdirectory(benchmark)
2837
endif()
@@ -61,3 +70,7 @@ target_link_libraries(EASTL EABase)
6170
#-------------------------------------------------------------------------------------------
6271
install(TARGETS EASTL DESTINATION lib)
6372
install(DIRECTORY include/EASTL DESTINATION include)
73+
74+
if (MSVC)
75+
install(FILES ${EASTL_NATVIS_FILE} DESTINATION ${EASTL_NATVIS_DIR})
76+
endif()

0 commit comments

Comments
 (0)