Add install options for npcomp libraries and executables (#183)

pull/185/head
stephenneuendorffer 2021-03-10 07:18:54 -08:00 committed by GitHub
parent b94a859e03
commit 06373dcbbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -29,6 +29,12 @@ function(add_npcomp_library name)
LINK_LIBS ${ARG_LINK_LIBS})
set_target_properties(${name} PROPERTIES FOLDER "NPCOMP libraries")
install(TARGETS ${name}
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
RUNTIME DESTINATION bin COMPONENT ${name})
endfunction()
# Declare the library associated with a dialect.
@ -58,6 +64,11 @@ function(add_npcomp_executable name)
# API for all shared libaries loaded by this executable.
target_link_libraries(${name} PRIVATE ${LLVM_PTHREAD_LIB})
endif()
install(TARGETS ${name}
RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR}
COMPONENT ${name})
endfunction()
function(npcomp_enable_exceptions name)