From cc1380a1608d8e7913e943e8530798c882c4fe6c Mon Sep 17 00:00:00 2001 From: Aaron Burke Date: Fri, 21 Aug 2020 10:15:42 -0700 Subject: [PATCH 2/7] sentencepiece.pc should be installed from CMAKE_CURRENT_BINARY_DIR, not CMAKE_BINARY_DIR, to support being included (and installed) from other projects --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6481dfd..9124f9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,7 +78,7 @@ configure_file("${PROJECT_SOURCE_DIR}/config.h.in" "config.h") configure_file("${PROJECT_SOURCE_DIR}/sentencepiece.pc.in" "sentencepiece.pc" @ONLY) if (NOT MSVC) - install(FILES "${CMAKE_BINARY_DIR}/sentencepiece.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sentencepiece.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) endif() include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_BINARY_DIR}) -- 2.18.0.huawei.25