diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b3f376c..8e6d06a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -60,7 +60,10 @@ if(NATS_BUILD_LIB_SHARED) target_include_directories(nats PUBLIC $ $) - install(TARGETS nats EXPORT cnats-targets DESTINATION ${NATS_LIBDIR}) + install(TARGETS nats EXPORT cnats-targets + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin) install(EXPORT cnats-targets NAMESPACE cnats:: FILE cnats-targets.cmake @@ -72,7 +75,10 @@ if(NATS_BUILD_LIB_STATIC) target_include_directories(nats_static PUBLIC $ $) - install(TARGETS nats_static EXPORT cnats-targets ARCHIVE DESTINATION ${NATS_LIBDIR}) + install(TARGETS nats_static EXPORT cnats-targets + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin) install(EXPORT cnats-targets NAMESPACE cnats:: FILE cnats-targets.cmake