mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[rttr] static compile fix (#23013)
* updated libunifex version * remove comment * run x-add-versions --all * Update ports/libunifex/vcpkg.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * rerun x-add-version libunifex * Update versions/l-/libunifex.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * update libunifex to 12-07 * x-add-version * libunifex port update force cpp20 as cpp17 build doesn't work with msvc. added a compile fix for externConstexpr and removed warnings with /EHsc * Update libunifex.json version update * Update fix-compile-error.patch relax clang warnings * Update libunifex.json git x-add-version libunifex * remove unused * x-add-versions * remove old version log * fixed static compile option * bumped port version * run x-add-version --all * Hook up RTTR's actual build settings. * Add license. * Remove ci.baseline skips. * Put ci.baseline.txt skips back with a comment. * Be less pessimistic in cmake config handling, fix typo, and add indents. Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
parent
5e7cbdceac
commit
ccf682927e
@ -10,44 +10,48 @@ vcpkg_from_github(
|
||||
remove-owner-read-perms.patch
|
||||
)
|
||||
|
||||
#Handle static lib
|
||||
set(BUILD_STATIC_LIB OFF)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
set(BUILD_STATIC_LIB ON)
|
||||
if("${VCPKG_LIBRARY_LINKAGE}" STREQUAL "static" AND "${VCPKG_CRT_LINKAGE}" STREQUAL "static")
|
||||
set(BUILD_STATIC ON)
|
||||
set(BUILD_RTTR_DYNAMIC OFF)
|
||||
set(BUILD_WITH_STATIC_RUNTIME_LIBS OFF)
|
||||
elseif("${VCPKG_LIBRARY_LINKAGE}" STREQUAL "dynamic" AND "${VCPKG_CRT_LINKAGE}" STREQUAL "static")
|
||||
set(BUILD_STATIC OFF)
|
||||
set(BUILD_RTTR_DYNAMIC OFF)
|
||||
set(BUILD_WITH_STATIC_RUNTIME_LIBS ON)
|
||||
elseif("${VCPKG_LIBRARY_LINKAGE}" STREQUAL "dynamic" AND "${VCPKG_CRT_LINKAGE}" STREQUAL "dynamic")
|
||||
set(BUILD_STATIC OFF)
|
||||
set(BUILD_RTTR_DYNAMIC ON)
|
||||
set(BUILD_WITH_STATIC_RUNTIME_LIBS OFF)
|
||||
else()
|
||||
set(BUILD_STATIC_LIB OFF)
|
||||
message(FATAL_ERROR "rttr's build system does not support this configuration: VCPKG_LIBRARY_LINKAGE: ${VCPKG_LIBRARY_LINKAGE} VCPKG_CRT_LINKAGE: ${VCPKG_CRT_LINKAGE}")
|
||||
endif()
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DBUILD_BENCHMARKS=OFF
|
||||
-DBUILD_UNIT_TESTS=OFF
|
||||
-DBUILD_STATIC=${BUILD_STATIC_LIB}
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_BENCHMARKS=OFF
|
||||
-DBUILD_UNIT_TESTS=OFF
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
-DBUILD_DOCUMENTATION=OFF
|
||||
-DBUILD_STATIC=${BUILD_STATIC}
|
||||
-DBUILD_RTTR_DYNAMIC=${BUILD_RTTR_DYNAMIC}
|
||||
-DBUILD_WITH_STATIC_RUNTIME_LIBS=${BUILD_WITH_STATIC_RUNTIME_LIBS}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_cmake_install()
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/rttr/cmake)
|
||||
elseif(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
|
||||
if (VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
|
||||
else()
|
||||
message(FATAL_ERROR "RTTR does not support this platform")
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH share/rttr/cmake)
|
||||
endif()
|
||||
|
||||
#Handle static lib
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
|
||||
#Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
file(REMOVE_RECURSE
|
||||
${CURRENT_PACKAGES_DIR}/debug/include
|
||||
${CURRENT_PACKAGES_DIR}/debug/share
|
||||
${CURRENT_PACKAGES_DIR}/debug/README.md
|
||||
${CURRENT_PACKAGES_DIR}/debug/LICENSE.txt
|
||||
${CURRENT_PACKAGES_DIR}/LICENSE.txt
|
||||
${CURRENT_PACKAGES_DIR}/README.md
|
||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/share"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/README.md"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/LICENSE.txt"
|
||||
"${CURRENT_PACKAGES_DIR}/LICENSE.txt"
|
||||
"${CURRENT_PACKAGES_DIR}/README.md"
|
||||
)
|
||||
|
@ -1,10 +1,20 @@
|
||||
{
|
||||
"name": "rttr",
|
||||
"version-string": "0.9.6",
|
||||
"port-version": 3,
|
||||
"version": "0.9.6",
|
||||
"port-version": 4,
|
||||
"description": "an easy and intuitive way to use reflection in C++",
|
||||
"homepage": "https://github.com/rttrorg/rttr",
|
||||
"license": "MIT",
|
||||
"supports": "(static & staticcrt) | (!static & staticcrt) | (!static & !staticcrt)",
|
||||
"dependencies": [
|
||||
"rapidjson"
|
||||
"rapidjson",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1024,6 +1024,10 @@ rtlsdr:arm64-windows=fail
|
||||
rtlsdr:arm-uwp=fail
|
||||
rtlsdr:x64-linux=fail
|
||||
rtlsdr:x64-osx=fail
|
||||
|
||||
# rttr's build fails in CI with
|
||||
# D:\buildtrees\rttr\src\v0.9.6-9229bdee1f.clean\src\rttr\detail\library\library_win.cpp(236): error C3861: 'LoadLibraryW': identifier not found
|
||||
# .... but it succeeds when I try building it locally.
|
||||
rttr:arm-uwp=fail
|
||||
rttr:x64-uwp=fail
|
||||
|
||||
|
@ -6290,7 +6290,7 @@
|
||||
},
|
||||
"rttr": {
|
||||
"baseline": "0.9.6",
|
||||
"port-version": 3
|
||||
"port-version": 4
|
||||
},
|
||||
"rxcpp": {
|
||||
"baseline": "4.1.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "14ae0cb613a9536333e7463b862276ad0e2e89ee",
|
||||
"version": "0.9.6",
|
||||
"port-version": 4
|
||||
},
|
||||
{
|
||||
"git-tree": "ce9e17ebafad158458c38697b246601e00b61ae8",
|
||||
"version-string": "0.9.6",
|
||||
|
Loading…
x
Reference in New Issue
Block a user