mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-15 04:47:59 +08:00
[kealib] Cleanup, fix CMake config (#35461)
This commit is contained in:
parent
293d43427b
commit
631ba72c10
@ -1,65 +0,0 @@
|
||||
diff --git a/include/libkea/KEAAttributeTable.h b/include/libkea/KEAAttributeTable.h
|
||||
index 3991ffb..ddc314f 100644
|
||||
--- a/include/libkea/KEAAttributeTable.h
|
||||
+++ b/include/libkea/KEAAttributeTable.h
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <map>
|
||||
#include <math.h>
|
||||
|
||||
-#include "H5Cpp.h"
|
||||
+#include <H5Cpp.h>
|
||||
|
||||
#include "libkea/KEACommon.h"
|
||||
#include "libkea/KEAException.h"
|
||||
diff --git a/include/libkea/KEAAttributeTableFile.h b/include/libkea/KEAAttributeTableFile.h
|
||||
index 902f485..245e068 100644
|
||||
--- a/include/libkea/KEAAttributeTableFile.h
|
||||
+++ b/include/libkea/KEAAttributeTableFile.h
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
-#include "H5Cpp.h"
|
||||
+#include <H5Cpp.h>
|
||||
|
||||
#include "libkea/KEACommon.h"
|
||||
#include "libkea/KEAException.h"
|
||||
diff --git a/include/libkea/KEAAttributeTableInMem.h b/include/libkea/KEAAttributeTableInMem.h
|
||||
index 7df369a..28018cc 100644
|
||||
--- a/include/libkea/KEAAttributeTableInMem.h
|
||||
+++ b/include/libkea/KEAAttributeTableInMem.h
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
-#include "H5Cpp.h"
|
||||
+#include <H5Cpp.h>
|
||||
|
||||
#include "libkea/KEACommon.h"
|
||||
#include "libkea/KEAException.h"
|
||||
diff --git a/include/libkea/KEACommon.h b/include/libkea/KEACommon.h
|
||||
index cb8a577..a6fbfca 100644
|
||||
--- a/include/libkea/KEACommon.h
|
||||
+++ b/include/libkea/KEACommon.h
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
-#include "H5Cpp.h"
|
||||
+#include <H5Cpp.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
diff --git a/include/libkea/KEAImageIO.h b/include/libkea/KEAImageIO.h
|
||||
index 87a2d07..c59a7f0 100644
|
||||
--- a/include/libkea/KEAImageIO.h
|
||||
+++ b/include/libkea/KEAImageIO.h
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
-#include "H5Cpp.h"
|
||||
+#include <H5Cpp.h>
|
||||
|
||||
#include "libkea/KEACommon.h"
|
||||
#include "libkea/KEAException.h"
|
43
ports/kealib/kealib-target.diff
Normal file
43
ports/kealib/kealib-target.diff
Normal file
@ -0,0 +1,43 @@
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index a9b19fe..3ab09c1 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -54,21 +54,8 @@ set_target_properties(${LIBKEA_LIB_NAME}
|
||||
)
|
||||
|
||||
add_library(Kealib INTERFACE)
|
||||
-target_include_directories(Kealib INTERFACE
|
||||
- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||
- $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
|
||||
- $<INSTALL_INTERFACE:include>
|
||||
-)
|
||||
-# TODO: a better way??
|
||||
-if(MSVC)
|
||||
- target_link_libraries(Kealib INTERFACE
|
||||
- $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/libkea${CMAKE_IMPORT_LIBRARY_SUFFIX}>
|
||||
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/lib/libkea${CMAKE_IMPORT_LIBRARY_SUFFIX}>)
|
||||
-else()
|
||||
- target_link_libraries(Kealib INTERFACE
|
||||
- $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/libkea${CMAKE_SHARED_LIBRARY_SUFFIX}>
|
||||
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/lib/libkea${CMAKE_SHARED_LIBRARY_SUFFIX}>)
|
||||
-endif(MSVC)
|
||||
+target_include_directories(Kealib INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
+target_link_libraries(Kealib INTERFACE ${LIBKEA_LIB_NAME})
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
diff --git a/src/Config.cmake.in b/src/Config.cmake.in
|
||||
index 7de44f9..8a7bb8c 100644
|
||||
--- a/src/Config.cmake.in
|
||||
+++ b/src/Config.cmake.in
|
||||
@@ -1,5 +1,10 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
+# FindHDF5.cmake may expose exported targets in HDF5_LIBRARIES.
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+set(HDF5_USE_STATIC_LIBRARIES "@HDF5_USE_STATIC_LIBRARIES@")
|
||||
+find_dependency(HDF5)
|
||||
+
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/libkeaTargets.cmake")
|
||||
|
||||
check_required_components(libkea)
|
14
ports/kealib/no-kea-config-script.diff
Normal file
14
ports/kealib/no-kea-config-script.diff
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 90f64d6..17f2929 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -222,9 +222,7 @@ add_test(NAME test1 COMMAND src/test1)
|
||||
###############################################################################
|
||||
# Installation
|
||||
if(MSVC)
|
||||
- install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_BINARY_DIR}/kea-config.bat" DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
else()
|
||||
- install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_BINARY_DIR}/kea-config" DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
endif(MSVC)
|
||||
install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_HEADER_DIR}/libkea/kea-config.h" DESTINATION include/libkea)
|
||||
###############################################################################
|
@ -4,7 +4,9 @@ vcpkg_from_github(
|
||||
REF "kealib-${VERSION}"
|
||||
SHA512 82399f1332ff2aeb6342732e9e5c897c813109fd18e77cfc8d866f06adf4faa7f080f1f3c0a3b777fb3a679912dacf4851b7ad09a338d6087dd1d26eb2d1689f
|
||||
HEAD_REF master
|
||||
PATCHES hdf5_include.patch
|
||||
PATCHES
|
||||
kealib-target.diff
|
||||
no-kea-config-script.diff
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
@ -16,13 +18,9 @@ vcpkg_cmake_configure(
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/bin")
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libkea)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libkea PACKAGE_NAME libkea)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|
||||
|
4
ports/kealib/usage
Normal file
4
ports/kealib/usage
Normal file
@ -0,0 +1,4 @@
|
||||
kealib provides CMake targets:
|
||||
|
||||
find_package(libkea CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE libkea::Kealib)
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "kealib",
|
||||
"version": "1.5.2",
|
||||
"port-version": 1,
|
||||
"description": "KEALib provides an implementation of the GDAL data model using HDF5.",
|
||||
"homepage": "https://github.com/ubarsc/kealib",
|
||||
"dependencies": [
|
||||
|
@ -3746,7 +3746,7 @@
|
||||
},
|
||||
"kealib": {
|
||||
"baseline": "1.5.2",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"keccak-tiny": {
|
||||
"baseline": "2014-09-08",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "a32984c499e3b89d71c221916c41d59cf8cb1834",
|
||||
"version": "1.5.2",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "e23b8bf23a4254e1028ca0c93f722a2691012852",
|
||||
"version": "1.5.2",
|
||||
|
Loading…
x
Reference in New Issue
Block a user