Skip to content

Commit

Permalink
Only install export when either library is actually being installed
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan957 committed Feb 24, 2022
1 parent 4d73ff0 commit 3b43ad8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,12 @@ configure_file(
config.cmake.in
${PROJECT_NAME}-config.cmake
@ONLY)
install(
EXPORT ${PROJECT_NAME}-targets
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
NAMESPACE ${PROJECT_NAME}::)
if(HDR_HISTOGRAM_INSTALL_SHARED OR HDR_HISTOGRAM_INSTALL_STATIC)
install(
EXPORT ${PROJECT_NAME}-targets
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
NAMESPACE ${PROJECT_NAME}::)
endif()
install(
FILES
${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
Expand Down

0 comments on commit 3b43ad8

Please sign in to comment.