Skip to content

Commit

Permalink
Add EASTL.natvis to EASTL when using MSVC and install to doc directory
Browse files Browse the repository at this point in the history
  • Loading branch information
SamVanheer committed Jan 31, 2023
1 parent 943ac2b commit cf39eb2
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 cf39eb2

Please sign in to comment.