mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 12:35:37 +08:00
[jemalloc]Fix dll generated when generating static library
This commit is contained in:
parent
195e4aa18a
commit
a833bf5593
@ -1,4 +1,4 @@
|
|||||||
Source: jemalloc
|
Source: jemalloc
|
||||||
Version: 4.3.1-2
|
Version: 4.3.1-3
|
||||||
Description: jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support
|
Description: jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support
|
||||||
Build-Depends:
|
Build-Depends:
|
||||||
|
25
ports/jemalloc/fix-static-build.patch
Normal file
25
ports/jemalloc/fix-static-build.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 0b8959a..55e6a5f 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -826,10 +826,16 @@ endif()
|
||||||
|
install(FILES include/jemalloc/jemalloc${install_suffix}.h
|
||||||
|
DESTINATION include/jemalloc)
|
||||||
|
|
||||||
|
-install(TARGETS ${LIBJEMALLOCSO}
|
||||||
|
- RUNTIME DESTINATION bin
|
||||||
|
- LIBRARY DESTINATION lib
|
||||||
|
- ARCHIVE DESTINATION lib)
|
||||||
|
+if (without-export)
|
||||||
|
+ install(TARGETS ${C_JETLIB}
|
||||||
|
+ LIBRARY DESTINATION lib
|
||||||
|
+ ARCHIVE DESTINATION lib)
|
||||||
|
+else()
|
||||||
|
+ install(TARGETS ${LIBJEMALLOCSO}
|
||||||
|
+ RUNTIME DESTINATION bin
|
||||||
|
+ LIBRARY DESTINATION lib
|
||||||
|
+ ARCHIVE DESTINATION lib)
|
||||||
|
+endif()
|
||||||
|
if (build-tests)
|
||||||
|
##################################################################
|
||||||
|
# Common source for Unit, Integration and stress test libraries
|
@ -15,15 +15,21 @@ vcpkg_from_github(
|
|||||||
vcpkg_apply_patches(
|
vcpkg_apply_patches(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
PATCHES
|
PATCHES
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch"
|
fix-cmakelists.patch
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/fix-utilities.patch"
|
fix-utilities.patch
|
||||||
|
fix-static-build.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (VCPKG_CRT_LINKAGE STREQUAL "dynamic")
|
||||||
|
set(BUILD_STATIC_LIBRARY OFF)
|
||||||
|
else()
|
||||||
|
set(BUILD_STATIC_LIBRARY ON)
|
||||||
|
endif()
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
DISABLE_PARALLEL_CONFIGURE
|
DISABLE_PARALLEL_CONFIGURE
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
PREFER_NINJA
|
PREFER_NINJA
|
||||||
OPTIONS -DGIT_FOUND=OFF -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
|
OPTIONS -DGIT_FOUND=OFF -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON -Dwithout-export=${BUILD_STATIC_LIBRARY}
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_install_cmake()
|
vcpkg_install_cmake()
|
||||||
|
Loading…
Reference in New Issue
Block a user