Skip to content

Commit 89096c2

Browse files
Merge #1692: cmake: configure libsecp256k1.pc during install
7106dce cmake: configure libsecp256k1.pc during install (Daniel Pfeifer) Pull request description: When installing to a given prefix, make sure that the .pc file contains that prefix rather than the value of `CMAKE_INSTALL_PREFIX` that the project was configured with. ACKs for top commit: real-or-random: ACK 7106dce I verified that it fixes the path in libsecp256k1.pc Tree-SHA512: 34841513d2dc52234718eab56ecb9224aa1e13ad2d13cd103624b355e0627c37441363ad24293e07da7a748191e6ed2b67649b489bf874bab35346146b78c16f
2 parents 29e73f4 + 7106dce commit 89096c2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cmake/GeneratePkgConfigFile.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
function(generate_pkg_config_file in_file)
2-
set(prefix ${CMAKE_INSTALL_PREFIX})
2+
set(prefix "@CMAKE_INSTALL_PREFIX@")
33
set(exec_prefix \${prefix})
44
set(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR})
55
set(includedir \${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
66
set(PACKAGE_VERSION ${PROJECT_VERSION})
7-
configure_file(${in_file} ${PROJECT_NAME}.pc @ONLY)
7+
configure_file(${in_file} ${PROJECT_NAME}.pc.in @ONLY)
8+
install(CODE "configure_file(
9+
\"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc.in\"
10+
\"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc\"
11+
@ONLY)" ALL_COMPONENTS)
812
endfunction()

0 commit comments

Comments
 (0)