mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-03 22:54:39 +00:00
Update CMakeLists.txt
Added ARGPARSE_INSTALL This allows a separate project using argparse through CMake FetchContent_Declare(...) to install the project without having to also install argparse.
This commit is contained in:
parent
6960571156
commit
764442f0f4
@ -7,6 +7,7 @@ project(argparse
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
option(ARGPARSE_INSTALL OFF)
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user