portfile.cmake 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. if(CMAKE_HOST_WIN32)
  2. vcpkg_acquire_msys(MSYS_ROOT PACKAGES make perl)
  3. set(MAKE "${MSYS_ROOT}/usr/bin/make.exe")
  4. set(PERL "${MSYS_ROOT}/usr/bin/perl.exe")
  5. else()
  6. find_program(MAKE make)
  7. if(NOT MAKE)
  8. message(FATAL_ERROR "Could not find make. Please install it through your package manager.")
  9. endif()
  10. endif()
  11. vcpkg_cmake_configure(
  12. SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}"
  13. OPTIONS
  14. -DSOURCE_PATH=${SOURCE_PATH}
  15. -DPERL=${PERL}
  16. -DMAKE=${MAKE}
  17. -DVCPKG_CONCURRENCY=${VCPKG_CONCURRENCY}
  18. )
  19. vcpkg_cmake_install()
  20. vcpkg_fixup_pkgconfig()
  21. file(GLOB HEADERS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/include/openssl/*.h")
  22. set(RESOLVED_HEADERS)
  23. foreach(HEADER ${HEADERS})
  24. get_filename_component(X "${HEADER}" REALPATH)
  25. list(APPEND RESOLVED_HEADERS "${X}")
  26. endforeach()
  27. file(INSTALL ${RESOLVED_HEADERS} DESTINATION "${CURRENT_PACKAGES_DIR}/include/openssl")
  28. file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)