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 /ports | |
| 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>
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/libconfig/CONTROL | 2 | ||||
| -rw-r--r-- | ports/libconfig/portfile.cmake | 33 |
2 files changed, 26 insertions, 9 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}") |
