Skip to content

Commit

Permalink
Merge pull request #487 from SamVanheer/add-natvis-install
Browse files Browse the repository at this point in the history
Add EASTL.natvis to EASTL when using MSVC and install to doc directory
  • Loading branch information
grojo-ea authored Jan 31, 2023
2 parents 943ac2b + cf39eb2 commit e757b44
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ include(CommonCppFlags)
file(GLOB EASTL_SOURCES "source/*.cpp")
add_library(EASTL ${EASTL_SOURCES})

if (MSVC)
set(EASTL_NATVIS_DIR "doc")
set(EASTL_NATVIS_FILE "${EASTL_NATVIS_DIR}/EASTL.natvis")
target_sources(EASTL INTERFACE
$<INSTALL_INTERFACE:${EASTL_NATVIS_FILE}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/${EASTL_NATVIS_FILE}>
)
endif()

if(EASTL_BUILD_BENCHMARK)
add_subdirectory(benchmark)
endif()
Expand Down Expand Up @@ -61,3 +70,7 @@ target_link_libraries(EASTL EABase)
#-------------------------------------------------------------------------------------------
install(TARGETS EASTL DESTINATION lib)
install(DIRECTORY include/EASTL DESTINATION include)

if (MSVC)
install(FILES ${EASTL_NATVIS_FILE} DESTINATION ${EASTL_NATVIS_DIR})
endif()

0 comments on commit e757b44

Please sign in to comment.