From 2cca1cd239f3b6d46fd1ae4a91ddbd5d00239b6f Mon Sep 17 00:00:00 2001 From: ds283 Date: Sat, 5 Dec 2015 12:18:12 +0000 Subject: [PATCH] Change ${CMAKE_BINARY_DIR} to ${CMAKE_CURRENT_BINARY_DIR} - if building as a submodule of another repository, installation of pkg-config files can fail because they may not be in the top-level binary directory - changing ${CMAKE_BINARY_DIR} to ${CMAKE_CURRENT_BINARY_DIR} allow CMake to find the files for installation --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 028970420..698133f20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,7 +129,7 @@ IF(JSONCPP_WITH_PKGCONFIG_SUPPORT) "pkg-config/jsoncpp.pc.in" "pkg-config/jsoncpp.pc" @ONLY) - INSTALL(FILES "${CMAKE_BINARY_DIR}/pkg-config/jsoncpp.pc" + INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/pkg-config/jsoncpp.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig") ENDIF()