abedra / libvault

A C++ library for Hashicorp Vault
MIT License
34 stars 26 forks source link

Build and install process #82

Closed zspasztori closed 3 years ago

zspasztori commented 3 years ago

Hi,

By default LINK_CURL is off. Is this intentional, since obviously linking will fail?

The package config file is not installed. Would you be okay with installing this too to "lib/pkgconfig" ?

also it might look nicer if the VaultClient.h would be in the following folder structure : include/libvault/VaultClient.h . So the user could do imports as #include "libvault/VaultClient.h"

abedra commented 3 years ago
  1. For LINK_CURL, it is intentionally left off. Not all systems want to link curl directly, but prefer to link curl at compile time, allowing them to better control how curl is inserted into the build.

  2. Not sure I follow on the package config file. Running make install does that. You may need to configure the appropriate paths when running cmake. Am I misunderstanding this question?

  3. That's a reasonable, and thinking more about it, a more appropriate place for it technically.

zspasztori commented 3 years ago

Regarding 2. I don't think it gets installed.

You would need to set the file to be installed, like this. : install(FILES "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc" DESTINATION lib/pkgconfig)

Right now the file gets configured but stays in the build folder. So pkg config can only find it if you set the PATH to it. But iit looks weird because the other files get installed to /usr/local/***