BewareMyPower opened a new pull request, #26: URL: https://github.com/apache/pulsar-client-cpp/pull/26
### Motivation Currently, the `pulsarStaticWithDeps` target (`libpulsarwithdeps.a`) is generated under the `./lib` directory relative to the project root path. However, if the cmake build directory is customized, e.g. `cmake -B build`, the `libpulsarwithdeps.a` is still generated under `lib/`, not `build/lib`. In addition, the install target doesn't install the `libpulsarwithdeps.a` except for MSVC build. ### Modification Modify the `lib/CMakeLists.txt` to: - generate `libpulsarwithdeps.a` under the CMake build directory - add `libpulsarwithdeps.a` to the install target ### Verification Run the following commands: ```bash cmake -DLINK_STATIC=ON -DCMAKE_INSTALL_PREFIX=/tmp/pulsar-cpp -B build cmake --build build --target install ``` We can see the following files generated and installed: ```bash $ ls -1 build/lib/libpulsar* build/lib/libpulsar.a build/lib/libpulsar.dylib build/lib/libpulsarnossl.dylib build/lib/libpulsarwithdeps.a $ ls -1 /tmp/pulsar-cpp/lib libpulsar.a libpulsar.dylib libpulsarnossl.dylib libpulsarwithdeps.a ``` ### Documentation <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. --> - [ ] `doc-required` (Your PR needs to update docs and you will update later) - [x] `doc-not-needed` (Please explain why) - [ ] `doc` (Your PR contains doc changes) - [ ] `doc-complete` (Docs have been already added) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
