mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 01:30:55 +08:00
[libsbml] Update, fix pc files (#42339)
This commit is contained in:
parent
c3613b1204
commit
2d84d4fe5f
@ -1,8 +1,8 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a8af3a4..3926b68 100644
|
||||
index b2e97c6..5f5418d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -421,8 +421,9 @@ set(LIBSBML_XML_LIBRARY_LIBS)
|
||||
@@ -435,8 +435,9 @@ set(LIBSBML_XML_LIBRARY_LIBS)
|
||||
if(WITH_EXPAT)
|
||||
|
||||
if(NOT TARGET EXPAT::EXPAT)
|
||||
@ -13,7 +13,7 @@ index a8af3a4..3926b68 100644
|
||||
|
||||
add_definitions( -DUSE_EXPAT )
|
||||
list(APPEND SWIG_EXTRA_ARGS -DUSE_EXPAT)
|
||||
@@ -443,7 +444,8 @@ endif(WITH_EXPAT)
|
||||
@@ -457,7 +458,8 @@ endif(WITH_EXPAT)
|
||||
set(USE_LIBXML OFF)
|
||||
if(WITH_LIBXML)
|
||||
|
||||
@ -23,7 +23,7 @@ index a8af3a4..3926b68 100644
|
||||
|
||||
add_definitions( -DUSE_LIBXML )
|
||||
list(APPEND SWIG_EXTRA_ARGS -DUSE_LIBXML)
|
||||
@@ -495,7 +497,7 @@ endif()
|
||||
@@ -509,7 +511,7 @@ endif()
|
||||
option(WITH_BZIP2 "Enable the use of bzip2 compression." ${BZIP_INITIAL_VALUE})
|
||||
set(USE_BZ2 OFF)
|
||||
if(WITH_BZIP2)
|
||||
@ -32,7 +32,7 @@ index a8af3a4..3926b68 100644
|
||||
set(USE_BZ2 ON)
|
||||
add_definitions( -DUSE_BZ2 )
|
||||
list(APPEND SWIG_EXTRA_ARGS -DUSE_BZ2)
|
||||
@@ -521,6 +525,9 @@ Separate multiple directories using semicolons." )
|
||||
@@ -535,6 +537,9 @@ Separate multiple directories using semicolons." )
|
||||
# Locate zlib
|
||||
#
|
||||
|
||||
@ -42,7 +42,7 @@ index a8af3a4..3926b68 100644
|
||||
set(ZLIB_INITIAL_VALUE)
|
||||
if (NOT LIBZ_LIBRARY)
|
||||
find_library(LIBZ_LIBRARY
|
||||
@@ -614,7 +621,6 @@ valid. It should contain the file zlib.h, but it does not.")
|
||||
@@ -628,7 +633,6 @@ valid. It should contain the file zlib.h, but it does not.")
|
||||
endif(WITH_ZLIB)
|
||||
|
||||
# install find scripts only for used dependencies
|
||||
@ -50,7 +50,7 @@ index a8af3a4..3926b68 100644
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@@ -671,7 +677,12 @@ if(WITH_CHECK)
|
||||
@@ -685,7 +689,12 @@ if(WITH_CHECK)
|
||||
|
||||
enable_testing()
|
||||
|
||||
@ -64,10 +64,22 @@ index a8af3a4..3926b68 100644
|
||||
|
||||
if (UNIX)
|
||||
# setup valgrind
|
||||
@@ -1005,17 +1016,18 @@ install(FILES ${DOCUMENTATION_FILES} DESTINATION ${MISC_PREFIX})
|
||||
@@ -1018,18 +1027,29 @@ install(FILES ${DOCUMENTATION_FILES} DESTINATION ${MISC_PREFIX})
|
||||
# Write libsbml.pc
|
||||
#
|
||||
|
||||
set (PRIVATE_LIBS "-lstdc++ -lm")
|
||||
-set (PRIVATE_LIBS "-lstdc++ -lm")
|
||||
+set(FAKE_CXX_LINKAGE "")
|
||||
+foreach(lib IN LISTS CMAKE_CXX_IMPLICIT_LINK_LIBRARIES)
|
||||
+ if(lib IN_LIST CMAKE_C_IMPLICIT_LINK_LIBRARIES)
|
||||
+ continue()
|
||||
+ elseif(EXISTS "${lib}")
|
||||
+ string(APPEND FAKE_CXX_LINKAGE " ${CMAKE_LINK_LIBRARY_FILE_FLAG}${lib}")
|
||||
+ else()
|
||||
+ string(APPEND FAKE_CXX_LINKAGE " ${CMAKE_LINK_LIBRARY_FLAG}${lib}")
|
||||
+ endif()
|
||||
+endforeach()
|
||||
+set (PRIVATE_LIBS "${FAKE_CXX_LINKAGE}")
|
||||
+set (PRIVATE_REQUIRES "")
|
||||
if (WITH_ZLIB)
|
||||
-set (PRIVATE_LIBS "${LIBZ_LIBRARY} ${PRIVATE_LIBS}")
|
||||
@ -87,7 +99,7 @@ index a8af3a4..3926b68 100644
|
||||
endif()
|
||||
if (WITH_XERCES)
|
||||
set (PRIVATE_LIBS "${XERCES_LIBRARY} ${PRIVATE_LIBS}")
|
||||
@@ -1037,9 +1049,7 @@ if (WITH_XERCES)
|
||||
@@ -1051,9 +1071,7 @@ if (WITH_XERCES)
|
||||
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/libsbml.pc" "Conflicts: xerces-c = 2.6.0\n")
|
||||
endif()
|
||||
|
||||
|
@ -2,7 +2,7 @@ vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO sbmlteam/libsbml
|
||||
REF "v${VERSION}"
|
||||
SHA512 2770c1d3295e22ed8fb8dfa2480efa160fc61fbeeca3a9e214e210acb3fd6531a5cfb22eeb72c5334158bf8ba21c27015d0910487a7ef060f594a708f197676c
|
||||
SHA512 d4960b2ef12d00ae93ea883f945acf435a99763a0e2e751d94a15c7ff22fd41ff31cb16c1f37aa23257b3eb0de894201420962b008a6fe43ef0511fa2612846a
|
||||
HEAD_REF development
|
||||
PATCHES
|
||||
dependencies.diff
|
||||
@ -10,13 +10,17 @@ vcpkg_from_github(
|
||||
no-docs.diff
|
||||
test-shared.diff
|
||||
)
|
||||
file(REMOVE
|
||||
"${SOURCE_PATH}/CMakeModules/FindBZ2.cmake"
|
||||
"${SOURCE_PATH}/CMakeModules/FindEXPAT.cmake"
|
||||
"${SOURCE_PATH}/CMakeModules/FindLIBXML.cmake"
|
||||
"${SOURCE_PATH}/CMakeModules/FindZLIB.cmake"
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_RUNTIME)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC_LIBRARY)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DYNAMIC_LIBRARY)
|
||||
|
||||
if("expat" IN_LIST FEATURES AND "libxml2" IN_LIST FEATURES)
|
||||
message("Feature expat conflicts with feature libxml2. Selecting libxml2.")
|
||||
message(WARNING "Feature expat conflicts with feature libxml2. Selecting libxml2.")
|
||||
list(REMOVE_ITEM FEATURES "expat")
|
||||
endif()
|
||||
|
||||
@ -43,8 +47,7 @@ vcpkg_cmake_configure(
|
||||
${FEATURE_OPTIONS}
|
||||
-DENABLE_L3V2EXTENDEDMATH:BOOL=ON
|
||||
-DWITH_STATIC_RUNTIME=${STATIC_RUNTIME}
|
||||
-DLIBSBML_SKIP_SHARED_LIBRARY=${STATIC_LIBRARY}
|
||||
-DLIBSBML_SKIP_STATIC_LIBRARY=${DYNAMIC_LIBRARY}
|
||||
-DWITH_SWIG=OFF
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
WITH_STATIC_RUNTIME
|
||||
)
|
||||
@ -66,6 +69,12 @@ endforeach()
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/sbml/common/extern.h" "defined LIBSBML_STATIC" "1")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/sbml/xml/XMLExtern.h" "defined(LIBLAX_STATIC)" "1")
|
||||
if(NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libsbml.pc" " -lsbml" " -lsbml-static")
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libsbml.pc" " -lsbml" " -lsbml-static")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
@ -1,4 +1,4 @@
|
||||
libsbml provides CMake targets:
|
||||
|
||||
find_package(libsbml CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE libsbml)
|
||||
find_package(libsbml CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE libsbml)
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "libsbml",
|
||||
"version": "5.20.2",
|
||||
"version": "5.20.4",
|
||||
"description": "A library for reading / writing SBML files",
|
||||
"homepage": "https://github.com/sbmlteam/libsbml",
|
||||
"license": "LGPL-2.1",
|
||||
"license": null,
|
||||
"supports": "!uwp & !xbox",
|
||||
"dependencies": [
|
||||
{
|
||||
@ -51,7 +51,10 @@
|
||||
"libxml2": {
|
||||
"description": "libsbml using libxml2 parser",
|
||||
"dependencies": [
|
||||
"libxml2"
|
||||
{
|
||||
"name": "libxml2",
|
||||
"default-features": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"multi": {
|
||||
|
@ -5081,7 +5081,7 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"libsbml": {
|
||||
"baseline": "5.20.2",
|
||||
"baseline": "5.20.4",
|
||||
"port-version": 0
|
||||
},
|
||||
"libsbsms": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "9185f1974518ea5a03627227a04b7ec0b36e49c1",
|
||||
"version": "5.20.4",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "5610c6abee862e6ef538a8c62fde2c6ff62325e0",
|
||||
"version": "5.20.2",
|
||||
|
Loading…
x
Reference in New Issue
Block a user