[SE] Add "install" actions to cmake build

The "install" build target will now copy the StreamExecutor library and
headers to the appropriate subdirectories of CMAKE_INSTALL_PREFIX.

llvm-svn: 280506
GitOrigin-RevId: 75fbe01eeb198107ced522e10e8f9441c8fe3e19
diff --git a/streamexecutor/CMakeLists.txt b/streamexecutor/CMakeLists.txt
index 3fd9af4..8baf976 100644
--- a/streamexecutor/CMakeLists.txt
+++ b/streamexecutor/CMakeLists.txt
@@ -64,6 +64,8 @@
 add_subdirectory(lib)
 add_subdirectory(examples)
 
+install(DIRECTORY include/ DESTINATION include)
+
 if (STREAM_EXECUTOR_ENABLE_DOXYGEN)
     find_package(Doxygen REQUIRED)
     configure_file(Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
diff --git a/streamexecutor/lib/CMakeLists.txt b/streamexecutor/lib/CMakeLists.txt
index f33e346..aa16f50 100644
--- a/streamexecutor/lib/CMakeLists.txt
+++ b/streamexecutor/lib/CMakeLists.txt
@@ -16,6 +16,8 @@
     Stream.cpp)
 target_link_libraries(streamexecutor ${llvm_libs})
 
+install(TARGETS streamexecutor DESTINATION lib)
+
 if(STREAM_EXECUTOR_UNIT_TESTS)
     add_subdirectory(unittests)
 endif()