diff options
| author | miheer vaidya <m.vaidya@utah.edu> | 2021-02-02 14:45:32 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-02 13:45:32 -0800 |
| commit | bbb50a7d8b009a6911c598058f0248cd8d752fbb (patch) | |
| tree | 7aadb57166bd0fe2ff88e69b3e47a0372048f2b7 | |
| parent | d97ce7dfc24939519c93978524766967fb5d95aa (diff) | |
| download | vcpkg-bbb50a7d8b009a6911c598058f0248cd8d752fbb.tar.gz vcpkg-bbb50a7d8b009a6911c598058f0248cd8d752fbb.zip | |
[libconfig] Fix libconfig when installing master branch (#15885)
* Fix libconfig when installing master branch
Also add a warning that stable version won't create cmakeConfig files
* run x-add-version
* Update ports/libconfig/portfile.cmake
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
* Update ports/libconfig/portfile.cmake
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
* Update ports/libconfig/portfile.cmake
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
* Update ports/libconfig/portfile.cmake
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
* Revert "run x-add-version"
This reverts commit 79b9ef86933a79012be9866ef638c8cee5abf02d.
* run x-add-version libconfig
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
| -rw-r--r-- | ports/libconfig/CONTROL | 2 | ||||
| -rw-r--r-- | ports/libconfig/portfile.cmake | 33 | ||||
| -rw-r--r-- | versions/baseline.json | 2 | ||||
| -rw-r--r-- | versions/l-/libconfig.json | 5 |
4 files changed, 32 insertions, 10 deletions
diff --git a/ports/libconfig/CONTROL b/ports/libconfig/CONTROL index f3a634240..5a8555e10 100644 --- a/ports/libconfig/CONTROL +++ b/ports/libconfig/CONTROL @@ -1,5 +1,5 @@ Source: libconfig Version: 1.7.2 -Port-Version: 3 +Port-Version: 4 Homepage: https://github.com/hyperrealm/libconfig Description: C/C++ library for processing configuration files diff --git a/ports/libconfig/portfile.cmake b/ports/libconfig/portfile.cmake index dd5a4482b..eb6d305bf 100644 --- a/ports/libconfig/portfile.cmake +++ b/ports/libconfig/portfile.cmake @@ -6,19 +6,36 @@ vcpkg_from_github( HEAD_REF master ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -) +if (NOT VCPKG_USE_HEAD_VERSION) + message("If you would like to use cmake with the port, use `--head` option with vcpkg install.") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +endif() + +if (NOT VCPKG_USE_HEAD_VERSION) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON + ) +else() + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF + ) +endif() vcpkg_install_cmake() vcpkg_copy_pdbs() +if (VCPKG_USE_HEAD_VERSION) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libconfig) +endif() + foreach(FILE ${CURRENT_PACKAGES_DIR}/include/libconfig.h++ ${CURRENT_PACKAGES_DIR}/include/libconfig.h) file(READ ${FILE} _contents) string(REPLACE "defined(LIBCONFIGXX_EXPORTS)" "0" _contents "${_contents}") diff --git a/versions/baseline.json b/versions/baseline.json index 91fb31ba2..3832e0b3a 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2866,7 +2866,7 @@ }, "libconfig": { "baseline": "1.7.2", - "port-version": 3 + "port-version": 4 }, "libconfuse": { "baseline": "2019-07-14", diff --git a/versions/l-/libconfig.json b/versions/l-/libconfig.json index 45a6c7df8..6d7eeafa1 100644 --- a/versions/l-/libconfig.json +++ b/versions/l-/libconfig.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "079c1b8cc62fe544a3277a949422bd68c57e0c45", + "version-string": "1.7.2", + "port-version": 4 + }, + { "git-tree": "c82b5fbc0a37ebd11ecb4f87b9d63df2552805e7", "version-string": "1.7.2", "port-version": 3 |
