vcpkg/ports/fcl/portfile.cmake
autoantwort e7e328cf9d
[many ports] call vcpkg_fixup_pkgconfig() (#20953)
* [many ports] call vcpkg_fixup_pkgconfig()

The ports generate pc files, but don't call vcpkg_fixup_pkgconfig() so that there are absolute paths in the pc files

* Update port-version for armadillo and polyclipping.

* Update version database.

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2021-10-27 15:19:28 -07:00

41 lines
1.2 KiB
CMake

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO flexible-collision-library/fcl
REF 0.7.0
SHA512 95612476f4706fcd60812204ec7495a956c4e318cc6ace9526ac93dc765605ddf73b2d0d9ff9f4c9c739e43c5f8e24670113c86e02868a2949ab234c3bf82374
HEAD_REF master
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" FCL_STATIC_LIBRARY)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(FCL_USE_X64_SSE ON)
else()
set(FCL_USE_X64_SSE OFF)
endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DFCL_STATIC_LIBRARY=${FCL_STATIC_LIBRARY}
-DFCL_BUILD_TESTS=OFF
-DFCL_USE_X64_SSE=${FCL_USE_X64_SSE}
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
if(EXISTS "${CURRENT_PACKAGES_DIR}/CMake")
vcpkg_cmake_config_fixup(CONFIG_PATH CMake)
else()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/fcl)
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_fixup_pkgconfig()