wxWidgets.cmake 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. if (APPLE)
  2. # The new OSX 11 (Big Sur) is not compatible with wxWidgets 3.1.3.
  3. # Let's use patched wxWidgets 3.1.4, even though it is not quite tested.
  4. set(_wx_git_tag v3.1.4-patched)
  5. else ()
  6. # Use the tested patched wxWidgets 3.1.3 everywhere else.
  7. set(_wx_git_tag v3.1.3-patched)
  8. endif ()
  9. # set(_patch_command "")
  10. set(_wx_toolkit "")
  11. if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
  12. set(_gtk_ver 2)
  13. if (DEP_WX_GTK3)
  14. set(_gtk_ver 3)
  15. endif ()
  16. set(_wx_toolkit "-DwxBUILD_TOOLKIT=gtk${_gtk_ver}")
  17. endif()
  18. prusaslicer_add_cmake_project(wxWidgets
  19. GIT_REPOSITORY "https://github.com/prusa3d/wxWidgets"
  20. GIT_TAG ${_wx_git_tag}
  21. # PATCH_COMMAND "${_patch_command}"
  22. DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG}
  23. CMAKE_ARGS
  24. -DwxBUILD_PRECOMP=ON
  25. ${_wx_toolkit}
  26. "-DCMAKE_DEBUG_POSTFIX:STRING="
  27. -DwxBUILD_DEBUG_LEVEL=0
  28. -DwxUSE_DETECT_SM=OFF
  29. -DwxUSE_UNICODE=ON
  30. -DwxUSE_OPENGL=ON
  31. -DwxUSE_LIBPNG=sys
  32. -DwxUSE_ZLIB=sys
  33. -DwxUSE_REGEX=builtin
  34. -DwxUSE_LIBXPM=builtin
  35. -DwxUSE_LIBJPEG=builtin
  36. -DwxUSE_LIBTIFF=builtin
  37. -DwxUSE_EXPAT=sys
  38. )
  39. if (MSVC)
  40. add_debug_dep(dep_wxWidgets)
  41. endif ()