Merge pull request #64 from google/cmake_install

Add install rule to cmake build.
This commit is contained in:
tomfinegan 2017-02-14 11:00:13 -08:00 committed by GitHub
commit 17cdf150cb

View File

@ -532,4 +532,18 @@ else ()
"${GTEST_SOURCE_DIR}/googletest/include")
target_link_libraries(draco_tests draco gtest)
endif ()
# Collect all of the header files in the tree, and add an install rule for
# each.
file(GLOB_RECURSE draco_headers RELATIVE ${draco_root} "*.h")
foreach (filename ${draco_headers})
get_filename_component(file_directory ${filename} DIRECTORY)
install(FILES ${filename} DESTINATION
"${CMAKE_INSTALL_PREFIX}/include/draco/${file_directory}")
endforeach()
# Add install rules for lib and executable targets.
install(TARGETS dracodec draco DESTINATION "${CMAKE_INSTALL_PREFIX}/lib")
install(TARGETS draco_decoder draco_encoder DESTINATION
"${CMAKE_INSTALL_PREFIX}/bin")
endif ()