
macro(sdk_install _DIR _TARGET _H_FILES _QM_FILES)
	#message("QM=${_QM_FILES}")
	if(LIB)
		if(WIN32)
			if(NOT "x${_H_FILES}" STREQUAL "x")
				install(FILES ${_H_FILES} DESTINATION ${MINGW_INCLUDE}/${_DIR})
			endif()
			qt_install(TARGETS ${_TARGET} ARCHIVE DESTINATION ${MINGW_LIB})
			qt_install(TARGETS ${_TARGET} RUNTIME DESTINATION ${MINGW_BIN})
			qt_install(TARGETS ${_TARGET} RUNTIME DESTINATION QtBin)
		else()
			if (NOT "x${_H_FILES}" STREQUAL "x")
				install(FILES ${_H_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${_DIR})
			endif()
			qt_install(TARGETS ${_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
		endif()
		if(NOT "x${_QM_FILES}" STREQUAL "x")
			qt_install(LANG ${_QM_FILES} DESTINATION QtLang)
		endif()
	else()
		if(NOT "x${_H_FILES}" STREQUAL "x")
			install(FILES ${_H_FILES} DESTINATION include/${_DIR})
		endif()
		if(WIN32)
			qt_install(TARGETS ${_TARGET} RUNTIME DESTINATION bin)
			qt_install(TARGETS ${_TARGET} ARCHIVE DESTINATION lib)
		else()
			qt_install(TARGETS ${_TARGET} DESTINATION lib)
		endif()
		if(NOT "x${_QM_FILES}" STREQUAL "x")
			qt_install(LANG ${_QM_FILES} DESTINATION lang)
		endif()
	endif()
endmacro()
