Merge pull request #231 from BryanFlynt/master

No install when used as third party
This commit is contained in:
Pranav 2022-11-08 09:42:30 -06:00 committed by GitHub
commit a8aa3cc999
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@ project(argparse
LANGUAGES CXX
)
option(ARGPARSE_INSTALL ON)
option(ARGPARSE_BUILD_TESTS OFF)
option(ARGPARSE_LONG_VERSION_ARG_ONLY OFF)
@ -36,6 +37,7 @@ if(ARGPARSE_BUILD_TESTS)
add_subdirectory(test)
endif()
if(ARGPARSE_INSTALL)
install(TARGETS argparse EXPORT argparseConfig)
install(EXPORT argparseConfig
NAMESPACE argparse::
@ -94,5 +96,6 @@ configure_file("${PackagingTemplatesDir}/pkgconfig.pc.in" "${PKG_CONFIG_FILE_NAM
install(FILES "${PKG_CONFIG_FILE_NAME}"
DESTINATION "${CMAKE_INSTALL_LIBDIR_ARCHIND}/pkgconfig"
)
endif()
include(CPack)