Fraunhofer-IIS / libjapi

libjapi is a universal JSON to C API library. It receives newline-delimited JSON (NDJSON) messages via TCP and calls registered C functions. A JSON response is returned for each request. Furthermore, it is also possible to create push services, which asynchronously push JSON messages to the clients subscribed to them.
MIT License
3 stars 1 forks source link

include files not installed with CMake #136

Open Michael-M-Baron opened 1 day ago

Michael-M-Baron commented 1 day ago

The CMake variable HEADERSis first set at CMakeLists.txt#16 to the list of libjapi header files.

However, in CMakeLists.txt#41 PUBLIC_HEADERS is used to set the PUBLIC_HEADER property of JAPI library object. So in fact an empty list of libraries will be installed.

Michael-M-Baron commented 1 day ago

Currently only the shared library .so file of libjapi is installed

root@0ac597d0a337:/mnt/build# make install
Scanning dependencies of target japi_objs
[ 12%] Building C object CMakeFiles/japi_objs.dir/src/creadline.c.o
[ 25%] Building C object CMakeFiles/japi_objs.dir/src/japi.c.o
[ 37%] Building C object CMakeFiles/japi_objs.dir/src/japi_pushsrv.c.o
[ 50%] Building C object CMakeFiles/japi_objs.dir/src/japi_utils.c.o
[ 62%] Building C object CMakeFiles/japi_objs.dir/src/networking.c.o
[ 75%] Building C object CMakeFiles/japi_objs.dir/src/rw_n.c.o
[ 75%] Built target japi_objs
Scanning dependencies of target japi
[ 87%] Linking C shared library libjapi.so
[ 87%] Built target japi
Scanning dependencies of target japi-static
[100%] Linking C static library libjapi-static.a
[100%] Built target japi-static
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libjapi.so.1
-- Up-to-date: /usr/local/lib/libjapi.so
Michael-M-Baron commented 1 day ago

After fixing the typo in #136, the install output is now looking

root@b078ae4afe53:/mnt/build# make install
Scanning dependencies of target japi_objs
[ 12%] Building C object CMakeFiles/japi_objs.dir/src/creadline.c.o
[ 25%] Building C object CMakeFiles/japi_objs.dir/src/japi.c.o
[ 37%] Building C object CMakeFiles/japi_objs.dir/src/japi_pushsrv.c.o
[ 50%] Building C object CMakeFiles/japi_objs.dir/src/japi_utils.c.o
[ 62%] Building C object CMakeFiles/japi_objs.dir/src/networking.c.o
[ 75%] Building C object CMakeFiles/japi_objs.dir/src/rw_n.c.o
[ 75%] Built target japi_objs
Scanning dependencies of target japi
[ 87%] Linking C shared library libjapi.so
[ 87%] Built target japi
Scanning dependencies of target japi-static
[100%] Linking C static library libjapi-static.a
[100%] Built target japi-static
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libjapi.so.1
-- Installing: /usr/local/lib/libjapi.so
-- Installing: /usr/local/include/creadline.h
-- Installing: /usr/local/include/japi.h
-- Installing: /usr/local/include/japi_pushsrv.h
-- Installing: /usr/local/include/japi_utils.h
-- Installing: /usr/local/include/networking.h
-- Installing: /usr/local/include/rw_n.h

Cmake is now installing the header files at the default path /usr/local/include. The exact install directory has to be discussed, since it is not globally available at this location what you would expect when installing a library.