Skip to content

Commit

Permalink
[geogram] update to 1.9.2 (microsoft#42920)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheney-W authored Dec 30, 2024
1 parent 352cf2f commit 23ef699
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 42 deletions.
57 changes: 31 additions & 26 deletions ports/geogram/fix-vcpkg-install.patch
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1fd796c..05bd735 100644
index 6934fca..c2f855d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,7 +53,7 @@ endif()
include(cmake/geogram.cmake)
@@ -68,7 +68,7 @@ set(GEOGRAM_INSTALL_PKGCONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig CACHE PATH "
set(GEOGRAM_INSTALL_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/modules CACHE PATH "CMake file install destination")


-set(VORPALINE_INCLUDE_SUBPATH geogram${VORPALINE_VERSION_MAJOR})
+set(VORPALINE_INCLUDE_SUBPATH ./)

# Determine the current Build-OS (Build-platform without the compiler info)
string(REGEX REPLACE "-[^-]+$" "" VORPALINE_OS ${VORPALINE_PLATFORM})
@@ -115,6 +115,7 @@ endif()
@@ -130,6 +130,7 @@ endif()
add_subdirectory(src/lib/third_party)

if(GEOGRAM_WITH_GRAPHICS)
+ find_package(GLFW3 REQUIRED)
add_subdirectory(src/lib/geogram_gfx)
+find_package(GLFW3 REQUIRED)
add_subdirectory(src/lib/geogram_gfx)
endif()

@@ -145,7 +146,44 @@ file(REMOVE ${CMAKE_BINARY_DIR}/doc/LICENSE.txt)
@@ -160,7 +161,44 @@ file(REMOVE ${CMAKE_BINARY_DIR}/doc/LICENSE.txt)

# FindGeogram.cmake

-install(FILES cmake/FindGeogram.cmake DESTINATION lib/cmake/modules COMPONENT devkit)
-install(FILES cmake/FindGeogram.cmake DESTINATION ${GEOGRAM_INSTALL_CMAKE_DIR} COMPONENT devkit)
+# This installation is not suitable for vcpkg
+# install(FILES cmake/FindGeogram.cmake DESTINATION lib/cmake/modules COMPONENT devkit)
+
Expand Down Expand Up @@ -66,26 +66,31 @@ index 1fd796c..05bd735 100644
# Configure CPack

diff --git a/src/lib/geogram/CMakeLists.txt b/src/lib/geogram/CMakeLists.txt
index ed2dca0..30f87b7 100644
index d50b3d2..41ec3e4 100644
--- a/src/lib/geogram/CMakeLists.txt
+++ b/src/lib/geogram/CMakeLists.txt
@@ -45,7 +45,7 @@ target_include_directories(geogram PRIVATE
@@ -69,7 +69,7 @@ endif()
# path for targets that depend on geogram.
# See: https://cmake.org/cmake/help/v3.3/command/target_include_directories.html
# https://stackoverflow.com/questions/26243169/cmake-target-include-directories-meaning-of-scope
-target_include_directories(geogram PUBLIC ${PROJECT_SOURCE_DIR}/src/lib)
+target_include_directories(geogram PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/lib>)

if(ANDROID)
target_include_directories(geogram PRIVATE
@@ -72,8 +72,19 @@ if(WIN32)
target_link_libraries(geogram psapi)
target_include_directories(geogram PRIVATE
@@ -78,6 +78,9 @@ ${ANDROID_NDK}/sources/android/native_app_glue
message(STATUS "building for Android")
endif()

+if(WIN32 AND VORPALINE_BUILD_DYNAMIC)
+ target_compile_definitions(geogram PUBLIC GEO_DYNAMIC_LIBS)
+endif()
+

set_target_properties(geogram PROPERTIES
VERSION ${VORPALINE_VERSION}
@@ -101,7 +104,14 @@ target_link_libraries(geogram ${GEOGRAMPLUS_LIBS})
endif()

# Install the library
-install_devkit_targets(geogram)
+install(
Expand All @@ -100,10 +105,10 @@ index ed2dca0..30f87b7 100644
# Install include files for the standard devkit
install(
diff --git a/src/lib/geogram_gfx/CMakeLists.txt b/src/lib/geogram_gfx/CMakeLists.txt
index a6f8372..195b1e2 100644
index 391e607..13b6bcb 100644
--- a/src/lib/geogram_gfx/CMakeLists.txt
+++ b/src/lib/geogram_gfx/CMakeLists.txt
@@ -52,14 +52,21 @@ if(VORPALINE_BUILD_DYNAMIC)
@@ -52,14 +52,21 @@ target_link_libraries(geogram_gfx ${OPENGL_LIBRARIES})
endif()

# Install the library
Expand All @@ -119,20 +124,20 @@ index a6f8372..195b1e2 100644

# Install include files for the standard devkit
install(
DIRECTORY .
DESTINATION include/${VORPALINE_INCLUDE_SUBPATH}/geogram_gfx
COMPONENT devkit
- FILES_MATCHING PATTERN *.h
+ FILES_MATCHING PATTERN *.h PATTERN *.xpm # xpm is the colrbar file
DIRECTORY .
DESTINATION include/${VORPALINE_INCLUDE_SUBPATH}/geogram_gfx
COMPONENT devkit
-FILES_MATCHING PATTERN *.h
+FILES_MATCHING PATTERN *.h PATTERN *.xpm # xpm is the colrbar file
)

# Install include files for the full devkit
@@ -67,7 +74,7 @@ install(
DIRECTORY .
DESTINATION include/${VORPALINE_INCLUDE_SUBPATH}/geogram_gfx
COMPONENT devkit-full
- FILES_MATCHING PATTERN *.h
+ FILES_MATCHING PATTERN *.h PATTERN *.xpm # xpm is the colrbar file
DIRECTORY .
DESTINATION include/${VORPALINE_INCLUDE_SUBPATH}/geogram_gfx
COMPONENT devkit-full
-FILES_MATCHING PATTERN *.h
+FILES_MATCHING PATTERN *.h PATTERN *.xpm # xpm is the colrbar file
)

install(
Expand Down
17 changes: 5 additions & 12 deletions ports/geogram/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
vcpkg_download_distfile(FIX_IMPLICIT_INT_PATCH
URLS https://github.com/BrunoLevy/geogram/commit/382da2d2f0d39bf8df2f65051c338e7e827e31db.patch?full_index=1
FILENAME geogram-implicit-ini-382da2d2f0d39bf8df2f65051c338e7e827e31db.patch
SHA512 1a85195b76cd7140fe890893bf1f57a1f9c30dbc2865bab28b7eda9d97b9bab5be7cbc638b24d8da489aee1e25e0e7289655ade13893bdc225d1b332f1d845a0
)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO BrunoLevy/geogram
REF "v${VERSION}"
SHA512 ae3d95be1c5061ace92921b3fcfb0027d23c595b131b0d31f1788adbe0d8f92367bef71736d6c936504bd37eba5fcdae658369f03734e233bf3eab14bca6f9e5
SHA512 ed60352bfc3bc65dfbeac7c34b5ecf59e12cd61678e961f7d3ca445315bc13d377df93982f070be69815824ea1d6490a683e108b0456a4ebf4019e9d9e206599
PATCHES
fix-vcpkg-install.patch
"${FIX_IMPLICIT_INT_PATCH}"
)

#third_party: amgcl
vcpkg_from_github(
OUT_SOURCE_PATH AMGCL_SOURCE_PATH
REPO ddemidov/amgcl
REF 8083b23fbe69c43cee0d4bc17e4334572e292c93
SHA512 1b29871ace68c53b46711012921261929f8bd612f93b47d2c59523cd3d68366956fe1c9ec81a94b3aaab63357001799c9e34af79376b940fa6b7a53cdf136897
REF a705f0822a332e215c41bccbeb6a7d92e90c49f2
SHA512 09dda0eb318ee4cd74af9ea67d9fcdce8a4399ab08b08cd72e2c7de953ad584204402b932c2a3222b7c74b25934267230bbc333a377e25f87ad045087ace2000
)

#third_party: libMeshb
vcpkg_from_github(
OUT_SOURCE_PATH LIBMESHB_SOURCE_PATH
REPO LoicMarechal/libMeshb
REF b4a91513317119ff71a1186906a052da0e535913
SHA512 bff30a233c2746a454d552be66f5654bf4af995d6f1eb00a4d21ed10c86234a5be4d6f31282645858e0a829b10fd98cad7188c69be65cdabbd18478fc26bad1f
REF e3678731ef14497c720ee7017a14450eba2602d2
SHA512 5c8f25805ce02cb48600914893f24ecd2dcbb8226692d47089605ff99db8785781407ec9152e29b0c3bc44d16f6d893cd171e5337c3cb1861468da05471872b6
)

#third_party: rply
Expand Down
3 changes: 1 addition & 2 deletions ports/geogram/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "geogram",
"version": "1.8.3",
"port-version": 3,
"version": "1.9.2",
"description": "Geogram is a programming library of geometric algorithms.",
"homepage": "https://github.com/BrunoLevy/geogram",
"license": "BSD-3-Clause",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3057,8 +3057,8 @@
"port-version": 3
},
"geogram": {
"baseline": "1.8.3",
"port-version": 3
"baseline": "1.9.2",
"port-version": 0
},
"geographiclib": {
"baseline": "2.5",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/geogram.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "84861deff832f4b9ee663513caf8285bff677d44",
"version": "1.9.2",
"port-version": 0
},
{
"git-tree": "7ecc3086e630018469ee01f4bc48d4dde9372ed8",
"version": "1.8.3",
Expand Down

0 comments on commit 23ef699

Please sign in to comment.