Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sundials] fix cmake targets to link bin/*.dll #18178

Merged
merged 2 commits into from
Jun 3, 2021
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
11 changes: 11 additions & 0 deletions ports/sundials/install-dlls-in-bin.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/cmake/macros/SundialsAddLibrary.cmake
+++ b/cmake/macros/SundialsAddLibrary.cmake
@@ -323,7 +323,7 @@
set_target_properties(${_actual_target_name} PROPERTIES ${_properties})
endif()

# install phase
- install(TARGETS ${_actual_target_name} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT sundials-targets)
+ install(TARGETS ${_actual_target_name} EXPORT sundials-targets)

endif()
27 changes: 2 additions & 25 deletions ports/sundials/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ vcpkg_from_github(
REF 73c280cd55ca2b42019c8a9aa54af10e41e27b9d # v5.7.0
SHA512 c70c53e5f5efe47255d23f36e71ffd75d61905a13a634a26bfbbd43c3c8764b7805db9a8cbe48c6cf69b2a1028701cb7118074bbbc01de71faf4f30bf0be22f9
HEAD_REF master
PATCHES
install-dlls-in-bin.patch
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SUN_BUILD_STATIC)
Expand All @@ -22,34 +24,9 @@ vcpkg_install_cmake(DISABLE_PARALLEL)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

file(GLOB REMOVE_DLLS
"${CURRENT_PACKAGES_DIR}/debug/lib/*.dll"
"${CURRENT_PACKAGES_DIR}/lib/*.dll"
)

file(GLOB DEBUG_DLLS
"${CURRENT_PACKAGES_DIR}/debug/lib/*.dll"
)

file(GLOB DLLS
"${CURRENT_PACKAGES_DIR}/lib/*.dll"
)

if(DLLS)
file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
endif()

if(DEBUG_DLLS)
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(REMOVE "${CURRENT_PACKAGES_DIR}/LICENSE")
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/LICENSE")

if(REMOVE_DLLS)
file(REMOVE ${REMOVE_DLLS})
endif()

vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
1 change: 1 addition & 0 deletions ports/sundials/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "sundials",
"version-semver": "5.7.0",
"port-version": 1,
"description": "SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers)",
"homepage": "https://computation.llnl.gov/projects/sundials"
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5898,7 +5898,7 @@
},
"sundials": {
"baseline": "5.7.0",
"port-version": 0
"port-version": 1
},
"superlu": {
"baseline": "2020-01-07",
Expand Down
5 changes: 5 additions & 0 deletions versions/s-/sundials.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "5acf78bcee903986a02aef256e969f1f7f7a87fa",
"version-semver": "5.7.0",
"port-version": 1
},
{
"git-tree": "f6b0c03d6b78a5632db68b010ab4d9526c73450c",
"version-semver": "5.7.0",
Expand Down