diff --git a/CMakeLists.txt b/CMakeLists.txt index 9eb550f..bf14e17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,3 +28,18 @@ install(FILES "mat2npz" "npy2mat" "npz2mat" DESTINATION bin PERMISSIONS OWNER_RE add_executable(example1 example1.cpp) target_link_libraries(example1 cnpy) + +install(TARGETS + cnpy + EXPORT cnpyConfig + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) + +install(EXPORT + cnpyConfig +# DESTINATION "${CMAKE_INSTALL_DATADIR}/cnpy/cmake" + DESTINATION "lib/cmake" + NAMESPACE cnpy:: + ) \ No newline at end of file