[mp-units] Configure only src folder (#26085)

* [mp-units] Configure only src folder

* [mp-units] Configure only src folder

+ add license
This commit is contained in:
LE GARREC Vincent 2022-08-03 08:17:02 +02:00 committed by GitHub
parent f594392b9d
commit d23405ca34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 33 deletions

View File

@ -1,30 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b18a30a96..d89248aa1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,11 +66,21 @@ conan_init(cmake)
add_subdirectory(src)
# add usage example
-add_subdirectory(example)
+option(BUILD_EXAMPLES "Build usage examples" OFF)
+if(BUILD_EXAMPLES)
+ add_subdirectory(example)
+endif()
# generate project documentation
-add_subdirectory(docs)
+option(BUILD_DOCS "Generate docs" OFF)
+if(BUILD_DOCS)
+ add_subdirectory(docs)
+endif()
# add unit tests
-enable_testing()
-add_subdirectory(test)
+option(BUILD_TESTING "Build tests" OFF)
+if(BUILD_TESTING)
+ set_warnings(mp-units)
+ enable_testing()
+ add_subdirectory(test)
+endif()

View File

@ -4,12 +4,11 @@ vcpkg_from_github(
REF v0.7.0
SHA512 72175f34f358d0741650ce9c8a7b28fced90cc45ddd3f1662ae1cb9ff7d31403ff742ee07ab4c96bd2d95af714d9111a888cf6acccb91e568e12d1ef663b2f64
PATCHES
cmake.patch
config.patch
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
SOURCE_PATH "${SOURCE_PATH}/src"
)
vcpkg_cmake_install()

View File

@ -1,8 +1,10 @@
{
"name": "mp-units",
"version-semver": "0.7.0",
"port-version": 1,
"description": "mp-units - A Units Library for C++",
"homepage": "https://github.com/mpusz/units",
"license": "MIT",
"dependencies": [
"fmt",
"gsl-lite",

View File

@ -4710,7 +4710,7 @@
},
"mp-units": {
"baseline": "0.7.0",
"port-version": 0
"port-version": 1
},
"mp3lame": {
"baseline": "3.100",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b4bce95b7e67f66db9d613e7e3601c2b90cec665",
"version-semver": "0.7.0",
"port-version": 1
},
{
"git-tree": "ed05b65c897d6508b0b5f88f8a97373cf8fd8715",
"version-semver": "0.7.0",