-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use HEADERS variable to set public header property of libjapi. PUBLIC… #137
base: dev
Are you sure you want to change the base?
Conversation
…_HEADERS as a variable was not set and thus leading to no installed headers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add the usage of make install
in the README? Cause while you explained to me why this is necessary, I was confused as well and there is no documentation. make help
also just gives you a list of possible targets without explanation
…be installed as a user module with libraries in /usr/local/lib and header files i /usr/local/include/
…ser can then decide to use either static or shared libjapi when using the installed libjapi version for building an application.
…ace pollution (A file like networking.h could potentially be also used in another library and could lead to problems). The same convention like for the json-c library is used which header files are installed at /usr/include/json-c. This change is backwards compatible since the include files were not available before this commit.
Added a new section to README.md explaining how libjapi can be installed. |
I also had a look add the linux conventions of where to install the library (See https://www.pathname.com/fhs/ and https://ubuntuforums.org/showthread.php?t=1528661 for reference).
In our case libjapi will be installed in /usr/local/lib and /usr/local/include/japi which makes sense since we do not have an officially managed package and install the library locally. The header files of libjapi will be installed in /usr/local/include/japi (into a subfolder japi) to follow the conventions used in json-c which header files are installed in /usr/include/json-c |
When testing on my machine,
The include files of japi however I had to manually add to the system environemnt with:
I then could use the installed version of libjapi to link against my application. Libjapi header files can be included like
This of course depends on how you set the
will be enough when including |
…installed-with-cmake
…_HEADERS as a variable was not set and thus leading to no installed headers