Skip to content

Commit

Permalink
Do not treat nlohmann as a library.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Nilsson committed Jun 6, 2019
1 parent 4fe5788 commit da4ca26
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ set(Graylog_INC
set(common_libs
PUBLIC
Threads::Threads
PRIVATE
nlohmann_json::nlohmann_json
)

get_target_property(JSON_INCLUDE_DIR nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES)

add_library(graylog_logger SHARED ${Graylog_SRC} ${Graylog_INC})
add_library(GraylogLogger::graylog_logger ALIAS graylog_logger)
target_link_libraries(graylog_logger ${common_libs})
Expand All @@ -42,6 +42,7 @@ target_include_directories(graylog_logger
PRIVATE
"."
${ASIO_INCLUDE_DIR}
${JSON_INCLUDE_DIR}
)

add_library(graylog_logger_static STATIC ${Graylog_SRC} ${Graylog_INC} ${Graylog_private_INC})
Expand All @@ -54,6 +55,7 @@ target_include_directories(graylog_logger_static
PRIVATE
"."
${ASIO_INCLUDE_DIR}
${JSON_INCLUDE_DIR}
)

set_target_properties(graylog_logger PROPERTIES VERSION ${PROJECT_VERSION})
Expand Down

0 comments on commit da4ca26

Please sign in to comment.