зеркало из https://github.com/microsoft/vcpkg.git
[libconfig] Fix static usage (#35280)
* [libconfig] Fix static usage * [libconfig] Update patch
This commit is contained in:
Родитель
aeabfa9386
Коммит
4b129ae0e7
|
@ -6,6 +6,7 @@ vcpkg_from_github(
|
||||||
HEAD_REF master
|
HEAD_REF master
|
||||||
PATCHES
|
PATCHES
|
||||||
libconfig++-cmake-export.diff
|
libconfig++-cmake-export.diff
|
||||||
|
static-build.diff
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_cmake_configure(
|
vcpkg_cmake_configure(
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
|
||||||
|
index 233c89f..8164b41 100644
|
||||||
|
--- a/lib/CMakeLists.txt
|
||||||
|
+++ b/lib/CMakeLists.txt
|
||||||
|
@@ -25,7 +25,6 @@ set(libinc_cpp
|
||||||
|
libconfig.hh)
|
||||||
|
|
||||||
|
set(libsrc_cpp
|
||||||
|
- ${libsrc}
|
||||||
|
libconfigcpp.cc)
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
@@ -55,8 +54,10 @@ set_target_properties(${libname}++
|
||||||
|
#check_symbol_exists(freelocale "locale.h" HAVE_FREELOCALE)
|
||||||
|
|
||||||
|
if(BUILD_SHARED_LIBS)
|
||||||
|
+ target_sources(${libname}++ PRIVATE ${libsrc})
|
||||||
|
target_compile_definitions(${libname}++ PRIVATE LIBCONFIG_STATIC)
|
||||||
|
else()
|
||||||
|
+ target_link_libraries(${libname}++ PRIVATE ${libname})
|
||||||
|
target_compile_definitions(${libname} PUBLIC LIBCONFIG_STATIC)
|
||||||
|
target_compile_definitions(${libname}++ PUBLIC LIBCONFIGXX_STATIC)
|
||||||
|
endif()
|
||||||
|
@@ -91,8 +92,8 @@ if(MSVC)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
- target_link_libraries(${libname} shlwapi)
|
||||||
|
- target_link_libraries(${libname}++ shlwapi)
|
||||||
|
+ target_link_libraries(${libname} PRIVATE shlwapi)
|
||||||
|
+ target_link_libraries(${libname}++ PRIVATE shlwapi)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(${libname}
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "libconfig",
|
"name": "libconfig",
|
||||||
"version": "1.7.3",
|
"version": "1.7.3",
|
||||||
"port-version": 4,
|
"port-version": 5,
|
||||||
"description": "C/C++ library for processing configuration files",
|
"description": "C/C++ library for processing configuration files",
|
||||||
"homepage": "https://github.com/hyperrealm/libconfig",
|
"homepage": "https://github.com/hyperrealm/libconfig",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
|
|
|
@ -4130,7 +4130,7 @@
|
||||||
},
|
},
|
||||||
"libconfig": {
|
"libconfig": {
|
||||||
"baseline": "1.7.3",
|
"baseline": "1.7.3",
|
||||||
"port-version": 4
|
"port-version": 5
|
||||||
},
|
},
|
||||||
"libconfuse": {
|
"libconfuse": {
|
||||||
"baseline": "2019-07-14",
|
"baseline": "2019-07-14",
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "bb011bd374885434cf90d445526e42aca185c1e7",
|
||||||
|
"version": "1.7.3",
|
||||||
|
"port-version": 5
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "378d40ce036cf220dfaedf27f625a28d6e72d3e9",
|
"git-tree": "378d40ce036cf220dfaedf27f625a28d6e72d3e9",
|
||||||
"version": "1.7.3",
|
"version": "1.7.3",
|
||||||
|
|
Загрузка…
Ссылка в новой задаче