🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
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.

60 lines
2.2 KiB

  1. project(alsoft-config)
  2. option(ALSOFT_NO_QT5 "Use Qt4 instead of Qt5 for alsoft-config" FALSE)
  3. include_directories("${alsoft-config_BINARY_DIR}")
  4. set(alsoft-config_SRCS
  5. main.cpp
  6. mainwindow.cpp
  7. mainwindow.h
  8. )
  9. set(alsoft-config_UIS mainwindow.ui)
  10. set(alsoft-config_MOCS mainwindow.h)
  11. find_package(Qt5Widgets)
  12. if(Qt5Widgets_FOUND AND NOT ALSOFT_NO_QT5)
  13. qt5_wrap_ui(UIS ${alsoft-config_UIS})
  14. qt5_wrap_cpp(MOCS ${alsoft-config_MOCS})
  15. add_executable(alsoft-config ${alsoft-config_SRCS} ${UIS} ${RSCS} ${TRS} ${MOCS})
  16. target_link_libraries(alsoft-config Qt5::Widgets)
  17. target_include_directories(alsoft-config PRIVATE "${OpenAL_BINARY_DIR}")
  18. set_property(TARGET alsoft-config APPEND PROPERTY COMPILE_FLAGS ${EXTRA_CFLAGS})
  19. set_target_properties(alsoft-config PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${OpenAL_BINARY_DIR})
  20. if(TARGET build_version)
  21. add_dependencies(alsoft-config build_version)
  22. endif()
  23. install(TARGETS alsoft-config
  24. RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
  25. LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
  26. ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
  27. )
  28. else()
  29. # Need Qt 4.8.0 or newer for the iconset theme attribute to work
  30. find_package(Qt4 4.8.0 COMPONENTS QtCore QtGui)
  31. if(QT4_FOUND)
  32. include(${QT_USE_FILE})
  33. qt4_wrap_ui(UIS ${alsoft-config_UIS})
  34. qt4_wrap_cpp(MOCS ${alsoft-config_MOCS})
  35. add_executable(alsoft-config ${alsoft-config_SRCS} ${UIS} ${RSCS} ${TRS} ${MOCS})
  36. target_link_libraries(alsoft-config ${QT_LIBRARIES})
  37. target_include_directories(alsoft-config PRIVATE "${OpenAL_BINARY_DIR}")
  38. set_property(TARGET alsoft-config APPEND PROPERTY COMPILE_FLAGS ${EXTRA_CFLAGS})
  39. set_target_properties(alsoft-config PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${OpenAL_BINARY_DIR})
  40. if(TARGET build_version)
  41. add_dependencies(alsoft-config build_version)
  42. endif()
  43. install(TARGETS alsoft-config
  44. RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
  45. LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
  46. ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
  47. )
  48. endif()
  49. endif()