CMakeLists.txt 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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}"
  29. )
  30. ENDIF()
  31. IF(LMMS_BUILD_APPLE)
  32. INSTALL(CODE "EXECUTE_PROCESS(COMMAND chmod u+x ${CMAKE_BINARY_DIR}/install_apple.sh)")
  33. INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_BINARY_DIR}/install_apple.sh)")
  34. ENDIF()