Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.4KB

  1. message(STATUS "Using host CMake version: ${CMAKE_VERSION}")
  2. if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
  3. # On Windows, using vcpkg to install and build is the best practice.
  4. set(VCPKG "$ENV{VCPKG_INSTALLATION_ROOT}/vcpkg.exe")
  5. execute_process(COMMAND "${VCPKG}" --triplet=x64-windows install glew sdl2
  6. RESULT_VARIABLE result
  7. )
  8. elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux")
  9. # On Ubuntu, installing the required dev packages is sufficient
  10. message(STATUS "Updating apt package sources")
  11. execute_process(COMMAND sudo apt-get update
  12. COMMAND sudo apt-get -f install
  13. RESULT_VARIABLE result
  14. )
  15. if(NOT result EQUAL 0)
  16. message(FATAL_ERROR "Could not update apt package lists")
  17. endif()
  18. execute_process(COMMAND sudo apt-get install
  19. libgl1-mesa-dev
  20. mesa-common-dev
  21. libsdl2-dev
  22. libglm-dev
  23. qtbase5-dev
  24. llvm-dev
  25. libvisual-0.4-dev
  26. libjack-jackd2-dev
  27. RESULT_VARIABLE result
  28. )
  29. elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Darwin")
  30. # macOS uses Homebrew to install additional software packages.
  31. execute_process(COMMAND brew update
  32. COMMAND brew install sdl2
  33. RESULT_VARIABLE result
  34. )
  35. endif()
  36. if(NOT result EQUAL 0)
  37. message(FATAL_ERROR "A command returned bad exit status")
  38. endif()