diff options
| author | Giulio Romualdi <giulio.romualdi@gmail.com> | 2020-08-07 20:49:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-07 11:49:36 -0700 |
| commit | 222c35e3bcb8f28cd63fc526e591bb4ef6b99e4f (patch) | |
| tree | 1cd17340ba292552baad7d180edb3c12407b1630 /ports/cppad/portfile.cmake | |
| parent | 025447ae0e2278cc73dc073b8dae8cb9f3022c50 (diff) | |
| download | vcpkg-222c35e3bcb8f28cd63fc526e591bb4ef6b99e4f.tar.gz vcpkg-222c35e3bcb8f28cd63fc526e591bb4ef6b99e4f.zip | |
[CppAD] Add CppAD port (#12560)
* [CppAD] Add CppAD port
* [CppAD] Fix compilation on Linux
* [CppAD] Remove vcpkg_common_functions from portfile.cmake
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
* [CppAD] Avoid to add the postfix 'd' in the debug library
* [CppAD] Patch the pkgconfig file generation
* [CppAD] Remove the support for uwp and arm
* [CppAD] add DISABLE_PARALLEL_CONFIGURE as option of vcpkg_configure_cmake() command
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
Diffstat (limited to 'ports/cppad/portfile.cmake')
| -rw-r--r-- | ports/cppad/portfile.cmake | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/ports/cppad/portfile.cmake b/ports/cppad/portfile.cmake new file mode 100644 index 000000000..1c9fc8ddf --- /dev/null +++ b/ports/cppad/portfile.cmake @@ -0,0 +1,42 @@ +# the compilation fails on arm and uwp. Please check the related issue: +# https://github.com/microsoft/vcpkg/pull/12560#issuecomment-668412073 +vcpkg_fail_port_install(ON_TARGET "uwp" and "arm") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO coin-or/CppAD + REF 20200000.3 + SHA512 4e980665a21c76cf355d1c5597c65fbfba7ac3e15c43a88ccfe3ba0267b85b4e9aa7c6e8a0ed7a728f8cf2c6e1424625d5cbcdd295a6c0a08b47b4b121572d13 + HEAD_REF master + PATCHES + windows-fix.patch + pkgconfig-fix.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -Dcppad_prefix=${CURRENT_PACKAGES_DIR} + OPTIONS_RELEASE + -Dcmake_install_libdirs=lib + -Dcppad_debug_which:STRING=debug_none + OPTIONS_DEBUG + -Dcmake_install_libdirs=debug/lib +) + +vcpkg_install_cmake() + +# Install the pkgconfig file +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/pkgconfig/cppad.pc DESTINATION ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/pkgconfig/cppad.pc DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +endif() + +vcpkg_fixup_pkgconfig() + +# Add the copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |
