mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 12:53:02 +08:00
Merge pull request #699 from msmolens/support-static-gtest
[gtest] Support static build
This commit is contained in:
commit
568d333c1f
@ -1,7 +1,3 @@
|
|||||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
||||||
message(STATUS "Warning: Static building not supported yet. Building dynamic.")
|
|
||||||
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
|
||||||
endif()
|
|
||||||
include(vcpkg_common_functions)
|
include(vcpkg_common_functions)
|
||||||
|
|
||||||
find_program(GIT git)
|
find_program(GIT git)
|
||||||
@ -42,16 +38,19 @@ vcpkg_configure_cmake(
|
|||||||
vcpkg_install_cmake()
|
vcpkg_install_cmake()
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/googletest/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gtest RENAME copyright)
|
file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/googletest/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gtest RENAME copyright)
|
||||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin/)
|
|
||||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest.dll ${CURRENT_PACKAGES_DIR}/bin/gtest.dll)
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest_main.dll ${CURRENT_PACKAGES_DIR}/bin/gtest_main.dll)
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin/)
|
||||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/bin/gmock.dll)
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest.dll ${CURRENT_PACKAGES_DIR}/bin/gtest.dll)
|
||||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/bin/gmock_main.dll)
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest_main.dll ${CURRENT_PACKAGES_DIR}/bin/gtest_main.dll)
|
||||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin/)
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/bin/gmock.dll)
|
||||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest.dll)
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/bin/gmock_main.dll)
|
||||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest_main.dll)
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin/)
|
||||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock.dll)
|
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest.dll)
|
||||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_main.dll)
|
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest_main.dll)
|
||||||
|
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock.dll)
|
||||||
|
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_main.dll)
|
||||||
|
endif()
|
||||||
|
|
||||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link)
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link)
|
||||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gtest.lib)
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gtest.lib)
|
||||||
|
Loading…
Reference in New Issue
Block a user