Skip to content

Commit

Permalink
llvm_gtest: install to appropriate locations.
Browse files Browse the repository at this point in the history
Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D158607
  • Loading branch information
dtzSiFive authored and dtzWill committed Aug 25, 2023
1 parent 9eb1e82 commit 91b3ca3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions third-party/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,18 @@ endif ()
target_include_directories(llvm_gtest
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/googletest/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/googlemock/include>
$<INSTALL_INTERFACE:include/llvm-gtest/>
$<INSTALL_INTERFACE:include/llvm-gmock/>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/llvm-gtest/>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/llvm-gmock/>
PRIVATE googletest googlemock
)

add_subdirectory(UnitTestMain)

if (LLVM_INSTALL_GTEST)
install(TARGETS llvm_gtest llvm_gtest_main LLVMTestingSupport LLVMTestingAnnotations
ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT llvm_gtest)
install(DIRECTORY googletest/include/gtest/ DESTINATION include/llvm-gtest/gtest/ COMPONENT llvm_gtest)
install(DIRECTORY googlemock/include/gmock/ DESTINATION include/llvm-gmock/gmock/ COMPONENT llvm_gtest)
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" COMPONENT llvm_gtest)
install(DIRECTORY googletest/include/gtest/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/llvm-gtest/gtest/" COMPONENT llvm_gtest)
install(DIRECTORY googlemock/include/gmock/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/llvm-gmock/gmock/" COMPONENT llvm_gtest)
endif()

# When LLVM_LINK_LLVM_DYLIB is enabled, libLLVM.so is added to the interface
Expand Down

0 comments on commit 91b3ca3

Please sign in to comment.