Skip to content

Commit 4c22f24

Browse files
ds283rpavlik
authored andcommitted
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 Conflicts: CMakeLists.txt
1 parent d423c46 commit 4c22f24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ IF(JSONCPP_WITH_PKGCONFIG_SUPPORT)
115115
"pkg-config/jsoncpp.pc.in"
116116
"pkg-config/jsoncpp.pc"
117117
@ONLY)
118-
INSTALL(FILES "${CMAKE_BINARY_DIR}/pkg-config/jsoncpp.pc"
119-
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
118+
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/pkg-config/jsoncpp.pc"
119+
DESTINATION "${LIBRARY_INSTALL_DIR}/pkgconfig")
120120
ENDIF()
121121

122122
IF(JSONCPP_WITH_CMAKE_PACKAGE)

0 commit comments

Comments
 (0)