|
1 | 1 | cmake_minimum_required(VERSION 3.28) |
2 | 2 |
|
3 | | -project(msft_proxy4 VERSION 4.1.0 LANGUAGES CXX) |
4 | | -add_library(msft_proxy4 INTERFACE) |
5 | | -set_target_properties(msft_proxy4 PROPERTIES EXPORT_NAME proxy) |
6 | | -add_library(msft_proxy4::proxy ALIAS msft_proxy4) |
| 3 | +project(msft_proxy5 VERSION 5.0.0 LANGUAGES CXX) |
| 4 | +add_library(msft_proxy5 INTERFACE) |
| 5 | +set_target_properties(msft_proxy5 PROPERTIES EXPORT_NAME proxy) |
| 6 | +add_library(msft_proxy5::proxy ALIAS msft_proxy5) |
7 | 7 |
|
8 | 8 | # Do not enable building tests if proxy is consumed as |
9 | 9 | # subdirectory (e.g. by CMake FetchContent_Declare). |
@@ -39,74 +39,74 @@ endif() |
39 | 39 | file(GLOB_RECURSE proxy_public_headers CONFIGURE_DEPENDS |
40 | 40 | "${CMAKE_CURRENT_SOURCE_DIR}/include/proxy/*.h" |
41 | 41 | "${CMAKE_CURRENT_SOURCE_DIR}/include/proxy/*.ixx") |
42 | | -target_sources(msft_proxy4 |
| 42 | +target_sources(msft_proxy5 |
43 | 43 | INTERFACE |
44 | 44 | FILE_SET public_headers |
45 | 45 | TYPE HEADERS |
46 | 46 | BASE_DIRS include |
47 | 47 | FILES ${proxy_public_headers} |
48 | 48 | ) |
49 | 49 |
|
50 | | -target_compile_features(msft_proxy4 INTERFACE cxx_std_20) |
| 50 | +target_compile_features(msft_proxy5 INTERFACE cxx_std_20) |
51 | 51 | target_include_directories( |
52 | | - msft_proxy4 |
| 52 | + msft_proxy5 |
53 | 53 | INTERFACE |
54 | 54 | $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
55 | 55 | $<INSTALL_INTERFACE:include> |
56 | 56 | ) |
57 | 57 |
|
58 | 58 | # Do not set the module target if proxy is consumed as a subdirectory. |
59 | 59 | if(PROJECT_IS_TOP_LEVEL) |
60 | | - set(msft_proxy4_INCLUDE_DIR include) |
| 60 | + set(msft_proxy5_INCLUDE_DIR include) |
61 | 61 | if(PROXY_BUILD_MODULES) |
62 | | - include(cmake/msft_proxy4ModuleTargets.cmake) |
| 62 | + include(cmake/msft_proxy5ModuleTargets.cmake) |
63 | 63 | endif() |
64 | 64 | else() |
65 | 65 | # Propagate the variable to the parent project |
66 | | - set(msft_proxy4_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE) |
| 66 | + set(msft_proxy5_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE) |
67 | 67 | endif() |
68 | 68 |
|
69 | 69 | # install and export the project. project name - proxy |
70 | 70 |
|
71 | 71 | include(GNUInstallDirs) |
72 | 72 |
|
73 | 73 | install( |
74 | | - TARGETS msft_proxy4 |
75 | | - EXPORT msft_proxy4Targets |
| 74 | + TARGETS msft_proxy5 |
| 75 | + EXPORT msft_proxy5Targets |
76 | 76 | FILE_SET public_headers DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} |
77 | 77 | ) |
78 | 78 |
|
79 | 79 | install( |
80 | | - EXPORT msft_proxy4Targets |
81 | | - NAMESPACE msft_proxy4:: |
82 | | - DESTINATION ${CMAKE_INSTALL_DATADIR}/msft_proxy4 |
| 80 | + EXPORT msft_proxy5Targets |
| 81 | + NAMESPACE msft_proxy5:: |
| 82 | + DESTINATION ${CMAKE_INSTALL_DATADIR}/msft_proxy5 |
83 | 83 | ) |
84 | 84 | export( |
85 | | - TARGETS msft_proxy4 |
86 | | - NAMESPACE msft_proxy4:: |
87 | | - FILE msft_proxy4Targets.cmake |
| 85 | + TARGETS msft_proxy5 |
| 86 | + NAMESPACE msft_proxy5:: |
| 87 | + FILE msft_proxy5Targets.cmake |
88 | 88 | ) |
89 | 89 |
|
90 | 90 | include(CMakePackageConfigHelpers) |
91 | 91 | configure_package_config_file( |
92 | | - cmake/msft_proxy4Config.cmake.in |
93 | | - ${CMAKE_CURRENT_BINARY_DIR}/cmake/msft_proxy4Config.cmake |
94 | | - INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}/msft_proxy4 |
| 92 | + cmake/msft_proxy5Config.cmake.in |
| 93 | + ${CMAKE_CURRENT_BINARY_DIR}/cmake/msft_proxy5Config.cmake |
| 94 | + INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}/msft_proxy5 |
95 | 95 | PATH_VARS CMAKE_INSTALL_INCLUDEDIR |
96 | 96 | ) |
97 | 97 |
|
98 | 98 | include(CMakePackageConfigHelpers) |
99 | 99 | write_basic_package_version_file( |
100 | | - cmake/msft_proxy4ConfigVersion.cmake |
| 100 | + cmake/msft_proxy5ConfigVersion.cmake |
101 | 101 | COMPATIBILITY SameMajorVersion |
102 | 102 | ARCH_INDEPENDENT |
103 | 103 | ) |
104 | 104 |
|
105 | 105 | install( |
106 | 106 | FILES |
107 | | - ${CMAKE_CURRENT_BINARY_DIR}/cmake/msft_proxy4Config.cmake |
108 | | - ${CMAKE_CURRENT_BINARY_DIR}/cmake/msft_proxy4ConfigVersion.cmake |
109 | | - DESTINATION ${CMAKE_INSTALL_DATADIR}/msft_proxy4 |
| 107 | + ${CMAKE_CURRENT_BINARY_DIR}/cmake/msft_proxy5Config.cmake |
| 108 | + ${CMAKE_CURRENT_BINARY_DIR}/cmake/msft_proxy5ConfigVersion.cmake |
| 109 | + DESTINATION ${CMAKE_INSTALL_DATADIR}/msft_proxy5 |
110 | 110 | ) |
111 | 111 |
|
112 | 112 | # build tests if BUILD_TESTING is ON |
|
0 commit comments