Skip to content
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

Fix jwt-cpp INTERFACE library #431

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 5 additions & 28 deletions Development/cmake/NmosCppDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -479,34 +479,11 @@ if(NOT NMOS_CPP_USE_SUPPLIED_JWT_CPP)
target_link_libraries(jwt-cpp INTERFACE jwt-cpp::jwt-cpp)
else()
message(STATUS "Using sources at third_party/jwt-cpp instead of external \"jwt-cpp\" package.")

set(JWT_SOURCES
)

set(JWT_HEADERS
third_party/jwt-cpp/base.h
third_party/jwt-cpp/jwt.h
third_party/jwt-cpp/traits/nlohmann-json/defaults.h
third_party/jwt-cpp/traits/nlohmann-json/traits.h
)

# hm, header-only so should be INTERFACE library?
add_library(
jwt-cpp STATIC
${JWT_SOURCES}
${JWT_HEADERS}
)

source_group("Source Files" FILES ${JWT_SOURCES})
source_group("Header Files" FILES ${JWT_HEADERS})

target_link_libraries(
jwt-cpp PRIVATE
nmos-cpp::compile-settings
)
target_include_directories(jwt-cpp PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${NMOS_CPP_INSTALL_INCLUDEDIR}>

add_library(jwt-cpp INTERFACE)
target_include_directories(jwt-cpp INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/third_party>
$<INSTALL_INTERFACE:${NMOS_CPP_INSTALL_INCLUDEDIR}/third_party>
)
endif()

Expand Down
Loading