Merge pull request #2318 from eli-schwartz/installfix

cmake: install pkg-config file relative to current_binary_dir
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c91ee6..4784466 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -158,7 +158,7 @@
         DESTINATION ${NLOHMANN_JSON_CONFIG_INSTALL_DIR}
     )
     install(
-        FILES "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc"
+        FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
         DESTINATION ${NLOHMANN_JSON_PKGCONFIG_INSTALL_DIR}
     )
 endif()