Skip to content

Commit

Permalink
move install
Browse files Browse the repository at this point in the history
  • Loading branch information
esigo committed Nov 19, 2021
1 parent 93065b1 commit 07d3d78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 8 additions & 0 deletions cmake/nlohmann-json.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ExternalProject_Add(nlohmann_json_download
"${nlohmann-json}"
UPDATE_COMMAND ""
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DJSON_BuildTests=OFF
-DJSON_Install=ON
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
Expand All @@ -32,3 +33,10 @@ target_include_directories(nlohmann_json_ INTERFACE
"$<INSTALL_INTERFACE:include>")
add_dependencies(nlohmann_json_ nlohmann_json_download)
add_library(nlohmann_json::nlohmann_json ALIAS nlohmann_json_)

install(
TARGETS nlohmann_json_
EXPORT "${PROJECT_NAME}-target"
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
1 change: 0 additions & 1 deletion exporters/otlp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ if(WITH_OTLP_HTTP)
if(nlohmann_json_clone)
add_dependencies(opentelemetry_exporter_otlp_http_client
nlohmann_json::nlohmann_json)
list(APPEND OPENTELEMETRY_OTLP_TARGETS nlohmann_json_)
endif()
target_include_directories(
opentelemetry_exporter_otlp_http_client
Expand Down

0 comments on commit 07d3d78

Please sign in to comment.