mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 17:41:09 +08:00
enable static library to rttr (#7359)
This commit is contained in:
parent
a97f42cf0b
commit
36112264bc
@ -1,7 +1,5 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO rttrorg/rttr
|
||||
@ -10,15 +8,23 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-directory-output.patch
|
||||
remove-owner-read-perms.patch
|
||||
remove-owner-read-perms.patch
|
||||
)
|
||||
|
||||
#Handle static lib
|
||||
set(BUILD_STATIC_LIB OFF)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
set(BUILD_STATIC_LIB ON)
|
||||
else()
|
||||
set(BUILD_STATIC_LIB OFF)
|
||||
endif()
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DBUILD_BENCHMARKS=OFF
|
||||
-DBUILD_UNIT_TESTS=OFF
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DBUILD_BENCHMARKS=OFF
|
||||
-DBUILD_UNIT_TESTS=OFF
|
||||
-DBUILD_STATIC=${BUILD_STATIC_LIB}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
@ -31,6 +37,11 @@ else()
|
||||
message(FATAL_ERROR "RTTR does not support this platform")
|
||||
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(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rttr)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/rttr/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/rttr/copyright)
|
||||
|
Loading…
x
Reference in New Issue
Block a user