aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
Diffstat (limited to 'ports')
-rw-r--r--ports/libconfig/CONTROL2
-rw-r--r--ports/libconfig/portfile.cmake33
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}")