portfile.cmake 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
  2. #set(VCPKG_BUILD_TYPE release) #You probably want to set this to reduce build type and space requirements
  3. message(STATUS "${PORT} requires a lot of free disk space (>300GB), ram (>32 GB) and time (>4h per configuration) to be successfully build.\n\
  4. -- As such ${PORT} is not properly tested.\n\
  5. -- If ${PORT} fails post build validation please open up an issue. \n\
  6. -- If it fails due to post validation the successfully installed files can be found in ${CURRENT_PACKAGES_DIR} \n\
  7. -- and just need to be copied into ${CURRENT_INSTALLED_DIR}")
  8. if(NOT VCPKG_TARGET_IS_WINDOWS)
  9. message(STATUS "If ${PORT} directly fails ${PORT} might require additional prerequisites on Linux and OSX. Please check the configure logs.\n")
  10. endif()
  11. include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake)
  12. vcpkg_find_acquire_program(FLEX)
  13. vcpkg_find_acquire_program(BISON)
  14. vcpkg_find_acquire_program(GPERF)
  15. vcpkg_find_acquire_program(PYTHON2)
  16. vcpkg_find_acquire_program(NINJA)
  17. get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY )
  18. get_filename_component(BISON_DIR "${BISON}" DIRECTORY )
  19. get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY )
  20. get_filename_component(GPERF_DIR "${GPERF}" DIRECTORY )
  21. get_filename_component(NINJA_DIR "${NINJA}" DIRECTORY )
  22. if(WIN32) # WIN32 HOST probably has win_flex and win_bison!
  23. if(NOT EXISTS "${FLEX_DIR}/flex${VCPKG_HOST_EXECUTABLE_SUFFIX}")
  24. file(CREATE_LINK "${FLEX}" "${FLEX_DIR}/flex${VCPKG_HOST_EXECUTABLE_SUFFIX}")
  25. endif()
  26. if(NOT EXISTS "${BISON_DIR}/BISON${VCPKG_HOST_EXECUTABLE_SUFFIX}")
  27. file(CREATE_LINK "${BISON}" "${BISON_DIR}/bison${VCPKG_HOST_EXECUTABLE_SUFFIX}")
  28. endif()
  29. endif()
  30. vcpkg_add_to_path(PREPEND "${FLEX_DIR}")
  31. vcpkg_add_to_path(PREPEND "${BISON_DIR}")
  32. vcpkg_add_to_path(PREPEND "${PYTHON2_DIR}")
  33. vcpkg_add_to_path(PREPEND "${GPERF_DIR}")
  34. vcpkg_add_to_path(PREPEND "${NINJA_DIR}")
  35. set(PATCHES common.pri.patch
  36. gl.patch
  37. build_1.patch
  38. build_2.patch
  39. build_3.patch)
  40. if(NOT VCPKG_TARGET_IS_WINDOWS)
  41. list(APPEND CORE_OPTIONS "BUILD_OPTIONS" "-webengine-system-libwebp" "-webengine-system-ffmpeg" "-webengine-system-icu")
  42. endif()
  43. qt_submodule_installation(${CORE_OPTIONS} PATCHES ${PATCHES})