wxWidgets.cmake 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. set(_wx_toolkit "")
  2. if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
  3. option(DEP_WX_GTK3 "Build wxWidgets for GTK3 instead of GTK2" OFF)
  4. set(_gtk_ver 2)
  5. if (DEP_WX_GTK3)
  6. set(_gtk_ver 3)
  7. endif ()
  8. set(_wx_toolkit "-DwxBUILD_TOOLKIT=gtk${_gtk_ver}")
  9. endif()
  10. set(_unicode_utf8 OFF)
  11. if (UNIX AND NOT APPLE) # wxWidgets will not use char as the underlying type for wxString unless its forced to.
  12. set (_unicode_utf8 ON)
  13. endif()
  14. add_cmake_project(wxWidgets
  15. URL https://github.com/prusa3d/wxWidgets/archive/78aa2dc0ea7ce99dc19adc1140f74c3e2e3f3a26.zip
  16. URL_HASH SHA256=94b7d972373503e380e5a8b0ca63b1ccb956da4006402298dd89a0c5c7041b1e
  17. CMAKE_ARGS
  18. "-DCMAKE_DEBUG_POSTFIX:STRING="
  19. -DwxBUILD_PRECOMP=ON
  20. ${_wx_toolkit}
  21. -DwxUSE_MEDIACTRL=OFF
  22. -DwxUSE_DETECT_SM=OFF
  23. -DwxUSE_UNICODE=ON
  24. -DwxUSE_UNICODE_UTF8=${_unicode_utf8}
  25. -DwxUSE_OPENGL=ON
  26. -DwxUSE_LIBPNG=sys
  27. -DwxUSE_ZLIB=sys
  28. -DwxUSE_NANOSVG=sys
  29. -DwxUSE_NANOSVG_EXTERNAL=ON
  30. -DwxUSE_REGEX=OFF
  31. -DwxUSE_LIBXPM=builtin
  32. -DwxUSE_LIBJPEG=sys
  33. -DwxUSE_LIBTIFF=OFF
  34. -DwxUSE_EXPAT=sys
  35. -DwxUSE_LIBSDL=OFF
  36. -DwxUSE_XTEST=OFF
  37. -DwxUSE_GLCANVAS_EGL=OFF
  38. -DwxUSE_WEBREQUEST=OFF
  39. )
  40. set(DEP_wxWidgets_DEPENDS ZLIB PNG EXPAT JPEG NanoSVG)