]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
build: fix pkg-config file generation (#9953)
authorAndrea Pappacoda <andrea@pappacoda.it>
Mon, 30 May 2022 19:46:40 +0000 (12:46 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Mon, 30 May 2022 19:46:40 +0000 (12:46 -0700)
commita0f391cafc260a4babe0b776244af3eff31b5acf
tree962e4391cbe053f785510679ec45c476efc3fbe3
parent0adac6f88eb5f0b68cda6b5cc8dbaa18794478e5
build: fix pkg-config file generation (#9953)

Summary:
- Instead of hardcoding "lib" and "include" in `libdir` and `includedir`, use the values from [`GNUInstallDirs`](https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html).

- Use `PROJECT_DESCRIPTION` and `PROJECT_HOMEPAGE_URL` instead of their
`CMAKE_` conterparts to fix pkg-config generation when rocksdb is not the top-level project (see [`project()`](https://cmake.org/cmake/help/latest/command/project.html)).

- Drop explicit `CMAKE_CURRENT_SOURCE_DIR` and `CMAKE_CURRENT_BINARY_DIR` in [`configure_file()`](https://cmake.org/cmake/help/latest/command/configure_file.html) as that's implied by default (and quite intuitive).

See https://github.com/facebook/rocksdb/issues/9945
CC: trynity
Pull Request resolved: https://github.com/facebook/rocksdb/pull/9953

Reviewed By: ajkr

Differential Revision: D36716373

Pulled By: jay-zhuang

fbshipit-source-id: 57840eeb4453099fa1fe861dc03366085dbca704
CMakeLists.txt
rocksdb.pc.in