Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions ports/libcpplocate/fix-install-paths.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 854214c..9c4d98a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -124,7 +124,7 @@ if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" OR "${CMAKE_INSTALL_PREFIX}" STREQU
endif()

# Installation paths
-if(UNIX AND SYSTEM_DIR_INSTALL)
Comment thread
ekilmer marked this conversation as resolved.
+if(1)
# Install into the system (/usr/bin or /usr/local/bin)
set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/<project>
set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share/<project>/cmake
diff --git a/cpplocate-config.cmake b/cpplocate-config.cmake
index 8693fa4..cdb2828 100644
--- a/cpplocate-config.cmake
+++ b/cpplocate-config.cmake
@@ -26,7 +26,7 @@ macro(find_modules PREFIX)
if(TARGET ${module_name})
set(MODULE_FOUND TRUE)
else()
- find_module("${CMAKE_CURRENT_LIST_DIR}/${PREFIX}/${module_name}/${module_name}-export.cmake")
+ find_module("${CMAKE_CURRENT_LIST_DIR}/${module_name}-export.cmake")
endif()
endforeach(module_name)
endmacro()
diff --git a/liblocate-config.cmake b/liblocate-config.cmake
index 3bf4823..7245353 100644
--- a/liblocate-config.cmake
+++ b/liblocate-config.cmake
@@ -25,7 +25,7 @@ macro(find_modules PREFIX)
if(TARGET ${module_name})
set(MODULE_FOUND TRUE)
else()
- find_module("${CMAKE_CURRENT_LIST_DIR}/${PREFIX}/${module_name}/${module_name}-export.cmake")
+ find_module("${CMAKE_CURRENT_LIST_DIR}/${module_name}-export.cmake")
endif()
endforeach(module_name)
endmacro()
41 changes: 41 additions & 0 deletions ports/libcpplocate/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO cginternals/cpplocate
REF 23aeb69c23848ff52456179374b9dfc1ede357bf # 2.3.0 in CMakeLists.txt "META_VERSION_*"
SHA512 3ab7074a30b089574f12e44842e4894788e5a19ad2a496c5e8307c479b378171974087ff3050e6dffe6e4fc2c2873310cefb191cb1a41bd6c0a83e32ba46ddcc
HEAD_REF master
PATCHES
fix-install-paths.patch
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DOPTION_BUILD_TESTS=OFF
)

vcpkg_cmake_install()
Comment thread
ekilmer marked this conversation as resolved.
vcpkg_copy_pdbs()

vcpkg_cmake_config_fixup(
PACKAGE_NAME cpplocate
CONFIG_PATH share/cpplocate/cmake/cpplocate
DO_NOT_DELETE_PARENT_CONFIG_PATH
)

vcpkg_cmake_config_fixup(
PACKAGE_NAME liblocate
CONFIG_PATH share/cpplocate/cmake/liblocate
)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/cpplocate/cmake")

# Patched liblocate config file needs moving to the correct directory
file(RENAME
"${CURRENT_PACKAGES_DIR}/share/cpplocate/liblocate-config.cmake"
"${CURRENT_PACKAGES_DIR}/share/liblocate/liblocate-config.cmake"
Comment thread
JackBoosY marked this conversation as resolved.
)

file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
18 changes: 18 additions & 0 deletions ports/libcpplocate/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "libcpplocate",
"version-semver": "2.3.0",
"description": "Cross-platform C++ library providing tools for applications to locate themselves, their data assets as well as dependent modules.",
"homepage": "https://cpplocate.org/",
"license": "MIT",
"supports": "!uwp",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3396,6 +3396,10 @@
"baseline": "1.4.1",
"port-version": 1
},
"libcpplocate": {
"baseline": "2.3.0",
"port-version": 0
},
"libcrafter": {
"baseline": "1.0",
"port-version": 2
Expand Down
9 changes: 9 additions & 0 deletions versions/l-/libcpplocate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "9f21e1bbd16d704cb664adbfb082852f71b6efdb",
"version-semver": "2.3.0",
"port-version": 0
}
]
}