pokowaka/jwt-cpp

Install header files?

mdr1384 opened this issue · 2 comments

Hi thanks for a nice package I especially like the new JSON library. I have a question though - is the make install supposed to be installing the jwt header files as well as the library file? I don't seem to get the jwt header files, just the JSON one... Note this is a bit of an odd case I am building a FreeBSD port for your package (for our local use), but it uses the unmodified CMakeLists.txt files.

===> Fetching all distfiles required by local-jwt-cpp-1.0.11 for building
=> SHA256 Checksum OK for pokowaka-jwt-cpp-v1.0-11-g3d103ab_GH0.tar.gz.
...
===> Performing out-of-source build
...
Building untagged branch
...
===> Building for local-jwt-cpp-1.0.11
...
===> Staging for local-jwt-cpp-1.0.11
===> Generating temporary packing list
[0/1] cd /var/ports/local/jwt-cpp/work/.build && /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
-- Install configuration: "Release"
-- Installing: /var/ports/local/jwt-cpp/work/stage/usr/local/lib/libjwt.a
-- Installing: /var/ports/local/jwt-cpp/work/stage/usr/local/include/jwt/json.hpp
====> Compressing man pages (compress-man)

FYI - though admittedly I don't know much about cmake, I was able to get the desired result by changing src/CMakeLists.txt:

$ cat files/patch-src_CMakeLists.txt
--- src/CMakeLists.txt.orig     2017-10-06 20:57:22 UTC
+++ src/CMakeLists.txt
@@ -12,7 +12,7 @@ FOREACH( DIR ${JWT_SOURCE_DIRS} )
   SET(JWT_SRC ${JWT_SRC} ${SRC} )
 ENDFOREACH( DIR ${JWT_SOURCE_DIRS} )

-FILE(GLOB JWT_HDR include/jwt/*.h??)
+FILE(GLOB JWT_HDR include/jwt/*.h include/jwt/*.h??)


 ADD_LIBRARY(jwt ${JWT_SRC} ${JWT_HDR})

Looks like I missed something. Do you want to create a pull request?