Merge pull request #3089 from past-due/box2d_fix_vcpkg_build_type

[box2d] Fix build failure when VCPKG_BUILD_TYPE is set
This commit is contained in:
Alexander Karatarakis 2018-03-20 01:56:55 -07:00 committed by GitHub
commit e4c9769226
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,23 +42,27 @@ set(OUTPUTS_PATH "${SOURCE_PATH}/Box2D/Build/vs2015/bin/${PROJECT_ARCH_BITS}")
vcpkg_build_msbuild(PROJECT_PATH ${SOURCE_PATH}/Box2D/Build/vs2015/Box2D.vcxproj)
message(STATUS "Packaging ${TARGET_TRIPLET}-Release lib")
file(
INSTALL ${OUTPUTS_PATH}/Release/
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
FILES_MATCHING PATTERN "*.lib"
)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Box2D.lib ${CURRENT_PACKAGES_DIR}/lib/box2d.lib)
message(STATUS "Packaging ${TARGET_TRIPLET}-Release lib done")
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
message(STATUS "Packaging ${TARGET_TRIPLET}-Release lib")
file(
INSTALL ${OUTPUTS_PATH}/Release/
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
FILES_MATCHING PATTERN "*.lib"
)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Box2D.lib ${CURRENT_PACKAGES_DIR}/lib/box2d.lib)
message(STATUS "Packaging ${TARGET_TRIPLET}-Release lib done")
endif()
message(STATUS "Packaging ${TARGET_TRIPLET}-Debug lib")
file(
INSTALL ${OUTPUTS_PATH}/Debug/
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
FILES_MATCHING PATTERN "*.lib"
)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Box2D.lib ${CURRENT_PACKAGES_DIR}/debug/lib/box2d.lib)
message(STATUS "Packaging ${TARGET_TRIPLET}-Debug lib done")
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
message(STATUS "Packaging ${TARGET_TRIPLET}-Debug lib")
file(
INSTALL ${OUTPUTS_PATH}/Debug/
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
FILES_MATCHING PATTERN "*.lib"
)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Box2D.lib ${CURRENT_PACKAGES_DIR}/debug/lib/box2d.lib)
message(STATUS "Packaging ${TARGET_TRIPLET}-Debug lib done")
endif()
message(STATUS "Packaging headers")
file(