Add install targets to cmake setup (#145)

This commit is contained in:
Julian Rüth 2022-09-06 20:23:20 +04:00 committed by GitHub
commit f81be80b52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -122,3 +122,6 @@ target_compile_options(cppast PRIVATE
# MSVC warnings
$<$<CXX_COMPILER_ID:MSVC>:
/W3>)
install(TARGETS cppast)
install(DIRECTORY ../include/ DESTINATION include)

View file

@ -5,3 +5,5 @@
add_executable(cppast_tool main.cpp)
target_link_libraries(cppast_tool PUBLIC cppast cxxopts)
set_target_properties(cppast_tool PROPERTIES CXX_STANDARD 11 OUTPUT_NAME cppast)
install(TARGETS cppast_tool)