Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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)
+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 v2.3.0
SHA512 4028d552d0c3c0161d5dd5aea27bb22f0c61297a4b461a067c082cfcf84e3a709c9895453e750d819433529089011c2512293b2064c42bb5ba11f957eebc2206
HEAD_REF master
PATCHES
fix-install-paths.patch
)

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

vcpkg_cmake_install()
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"
)

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 @@ -3400,6 +3400,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": "5f15b69e558a8774ebbc5bde4f5ddf70da27611c",
"version-semver": "2.3.0",
"port-version": 0
}
]
}