CMakeLists.txt 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. SET(PLUGIN_FILES "")
  2. IF(LMMS_BUILD_WIN32)
  3. INSTALL(FILES $<TARGET_FILE:Qt5::QWindowsIntegrationPlugin> DESTINATION platforms)
  4. ENDIF()
  5. IF(LMMS_BUILD_WIN32 OR LMMS_INSTALL_DEPENDENCIES)
  6. include(InstallTargetDependencies)
  7. # Collect directories to search for DLLs
  8. GET_FILENAME_COMPONENT(QTBIN_DIR "${QT_QMAKE_EXECUTABLE}" PATH)
  9. set(LIB_DIRS "${QTBIN_DIR}")
  10. GET_PROPERTY(PLUGINS_BUILT GLOBAL PROPERTY PLUGINS_BUILT)
  11. IF(LMMS_BUILD_WIN32)
  12. SET(LMMS_DEP_DESTINATION ${BIN_DIR})
  13. SET(PLUGIN_DEP_DESTINATION ${BIN_DIR})
  14. ELSE()
  15. SET(LMMS_DEP_DESTINATION ${LIB_DIR})
  16. SET(PLUGIN_DEP_DESTINATION ${LIB_DIR})
  17. ENDIF()
  18. INSTALL_TARGET_DEPENDENCIES(
  19. NAME "main_binary"
  20. TARGETS lmms
  21. DESTINATION "${LMMS_DEP_DESTINATION}"
  22. LIB_DIRS ${LIB_DIRS}
  23. )
  24. INSTALL_TARGET_DEPENDENCIES(
  25. NAME "plugins"
  26. TARGETS ${PLUGINS_BUILT}
  27. DESTINATION ${PLUGIN_DEP_DESTINATION}
  28. LIB_DIRS ${LIB_DIRS} "${PLUGIN_DIR}" "${PLUGIN_DIR}/optional"
  29. SEARCH_PATHS "${PLUGIN_DIR}" "${PLUGIN_DIR}/optional"
  30. )
  31. ENDIF()
  32. IF(LMMS_BUILD_APPLE)
  33. INSTALL(CODE "EXECUTE_PROCESS(COMMAND chmod u+x ${CMAKE_BINARY_DIR}/install_apple.sh)")
  34. INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_BINARY_DIR}/install_apple.sh)")
  35. ENDIF()