mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 11:52:20 +08:00
050e71d01d
* [various ports] remove references to CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * [alac,benchmark,capnproto] Fix check_linkage call * [fastlz] Fix SHA512 * [coroutine] Fix dynamic build * [folly] Find double-conversion * [gamma] Use vcpkg_from_github * [librsync] Enable static builds * [netcdf-cxx4] Fix SHA512 * [octomap] Fix static build * [tidy-html5] Fix static build * [various ports] remove custom messages for shared/static builds, modernize some scripts in the meantime * [folly] Use ras0219's fix for link paths * [octomap] Fix exported targets * [uvatlas] Set tool download SHA512 * [duktape+python2] fix portfile to call configure with correct python version, manage python2 also outside win32 * [suitesparse] osx fix * [gtkmm] Call vcpkg_check_linkage after including vcpkg functions * [duktape] Resolve conflicts * [duktape] FIxed typo in Python paths * [wangle] Find zlib * [openssl-uwp] Fix SHA512 * [glib] Allow static builds on non-Windows * [suitesparse] Fix build on Windows * [multiple ports] Bump CONTROL version * [multiple ports] Fix description indent * [directxtk] Fix CONTROL file * [bde,duktape,qpid-proton] Build packages with python2 installed * [binn] remove CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * [gdal,live555,uriparser] Fix regressions * [live555] Update to 2019.04.24
106 lines
3.8 KiB
CMake
106 lines
3.8 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
# Check architecture:
|
|
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
|
set(BUILD_ARCH "Win32")
|
|
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
|
set(BUILD_ARCH "x64")
|
|
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
|
|
set(BUILD_ARCH "ARM")
|
|
else()
|
|
message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
|
|
endif()
|
|
|
|
# Check library linkage:
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT)
|
|
|
|
# Get source code:
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO faburaya/3FD
|
|
REF v2.6.2
|
|
SHA512 a2444cc07d8741540c6071ac59bc8c63785db52e412a843aa18a5dfa0144b5001d428e44bcb520238e3d476440bc74526343f025005f05d534e732645f59cbe0
|
|
HEAD_REF master
|
|
PATCHES
|
|
"${CMAKE_CURRENT_LIST_DIR}/remove-seekpos.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/DataException.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/RapidXML.patch"
|
|
)
|
|
|
|
# Copy the sources to ensure a clean, out-of-source build
|
|
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all)
|
|
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all)
|
|
file(COPY ${SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all)
|
|
get_filename_component(LAST_DIR_NAME "${SOURCE_PATH}" NAME)
|
|
set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all/${LAST_DIR_NAME}")
|
|
|
|
# Build:
|
|
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") # UWP:
|
|
vcpkg_build_msbuild(
|
|
USE_VCPKG_INTEGRATION
|
|
PROJECT_PATH ${SOURCE_PATH}/3FD/3FD.WinRT.UWP.vcxproj
|
|
PLATFORM ${BUILD_ARCH}
|
|
)
|
|
elseif (NOT VCPKG_CMAKE_SYSTEM_NAME) # Win32:
|
|
vcpkg_build_msbuild(
|
|
USE_VCPKG_INTEGRATION
|
|
PROJECT_PATH ${SOURCE_PATH}/3FD/3FD.vcxproj
|
|
PLATFORM ${BUILD_ARCH}
|
|
TARGET Build
|
|
)
|
|
else()
|
|
message(FATAL_ERROR "Unsupported system: 3FD is not currently ported to VCPKG in ${VCPKG_CMAKE_SYSTEM_NAME}!")
|
|
endif()
|
|
|
|
# Install:
|
|
file(GLOB HEADER_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/3FD/*.h")
|
|
file(INSTALL
|
|
${HEADER_FILES}
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD
|
|
PATTERN "*_impl*.h" EXCLUDE
|
|
PATTERN "*example*.h" EXCLUDE
|
|
PATTERN "stdafx.h" EXCLUDE
|
|
PATTERN "targetver.h" EXCLUDE
|
|
)
|
|
|
|
file(INSTALL ${SOURCE_PATH}/btree DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD)
|
|
file(INSTALL ${SOURCE_PATH}/OpenCL/CL DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD)
|
|
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/3FD)
|
|
file(INSTALL
|
|
${SOURCE_PATH}/3FD/3fd-config-template.xml
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/share/3FD
|
|
)
|
|
|
|
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") # Visual C++, UWP app:
|
|
file(INSTALL
|
|
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.WinRT.UWP/3FD.WinRT.UWP.lib
|
|
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.WinRT.UWP/_3FD_WinRT_UWP.pri
|
|
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/WinRT.UWP/3FD.WinRT.UWP.pdb
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
|
|
)
|
|
file(INSTALL
|
|
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.WinRT.UWP/3FD.WinRT.UWP.lib
|
|
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.WinRT.UWP/_3FD_WinRT_UWP.pri
|
|
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/WinRT.UWP/3FD.WinRT.UWP.pdb
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
|
|
)
|
|
else() # Visual C++, Win32 app:
|
|
file(INSTALL
|
|
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.lib
|
|
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.pdb
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
|
|
)
|
|
file(INSTALL
|
|
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.lib
|
|
${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.pdb
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
|
|
)
|
|
endif()
|
|
|
|
# Handle copyright
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/3fd RENAME copyright)
|
|
file(INSTALL ${SOURCE_PATH}/Acknowledgements.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/3fd)
|
|
|
|
vcpkg_copy_pdbs()
|