Skip to content

Commit 1101684

Browse files
author
Taylor C. Richberger
committed
make cmake install also install version file
1 parent 156f89e commit 1101684

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

CMakeLists.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,16 @@
2121

2222
cmake_minimum_required(VERSION 3.2)
2323

24-
include(GNUInstallDirs)
2524
string(REPLACE "/${CMAKE_LIBRARY_ARCHITECTURE}" "" CMAKE_INSTALL_LIBDIR_ARCHIND "${CMAKE_INSTALL_LIBDIR}")
2625

27-
2826
set(ARGS_MAIN_PROJECT OFF)
2927
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
3028
set(ARGS_MAIN_PROJECT ON)
3129
endif()
32-
project(args CXX)
33-
set(PROJECT_DESCRIPTION "A simple, small, flexible, single-header C++11 argument parsing library. that is designed to appear somewhat similar to Python's argparse.")
34-
set(PROJECT_HOMEPAGE_URL "https://github.com/Taywee/args")
35-
set(PROJECT_VERSION 6.4.2)
30+
31+
project(args LANGUAGES CXX VERSION 6.4.3 DESCRIPTION "A flexible single-header C++11 argument parsing library that is designed to appear somewhat similar to Python's argparse" HOMEPAGE_URL "https://github.com/Taywee/args")
32+
33+
include(GNUInstallDirs)
3634

3735
option(ARGS_BUILD_EXAMPLE "Build example" ON)
3836
option(ARGS_BUILD_UNITTESTS "Build unittests" ON)
@@ -46,12 +44,16 @@ target_include_directories(args INTERFACE
4644
$<INSTALL_INTERFACE:include>)
4745

4846
if(ARGS_MAIN_PROJECT)
47+
include(CMakePackageConfigHelpers)
4948
install(FILES args.hxx DESTINATION include)
5049
install(TARGETS args EXPORT args-targets)
5150
install(EXPORT args-targets
5251
FILE args-config.cmake
5352
NAMESPACE taywee::
5453
DESTINATION lib/cmake/args)
54+
55+
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/args-config-version.cmake" COMPATIBILITY SameMajorVersion ARCH_INDEPENDENT)
56+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/args-config-version.cmake" DESTINATION lib/cmake/args)
5557
endif()
5658

5759
if (ARGS_BUILD_EXAMPLE)

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "args"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 6.4.2
41+
PROJECT_NUMBER = 6.4.3
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

args.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
#ifndef ARGS_HXX
3434
#define ARGS_HXX
3535

36-
#define ARGS_VERSION "6.4.2"
36+
#define ARGS_VERSION "6.4.3"
3737
#define ARGS_VERSION_MAJOR 6
3838
#define ARGS_VERSION_MINOR 4
39-
#define ARGS_VERSION_PATCH 2
39+
#define ARGS_VERSION_PATCH 3
4040

4141
#include <algorithm>
4242
#include <iterator>

conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class ArgsConan(ConanFile):
44
name = "args"
5-
version = "6.4.2"
5+
version = "6.4.3"
66
url = "https://github.com/Taywee/args"
77
description = "A simple header-only C++ argument parser library."
88
license = "MIT"

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
project('args.hxx', ['cpp'],
2-
version: '6.4.2',
2+
version: '6.4.3',
33
default_options: 'cpp_std=c++11',
44
license: 'MIT'
55
)

0 commit comments

Comments
 (0)